WO2013051677A1 - Communication system, communication device, communication method, and communication parameter determining method - Google Patents

Communication system, communication device, communication method, and communication parameter determining method Download PDF

Info

Publication number
WO2013051677A1
WO2013051677A1 PCT/JP2012/075883 JP2012075883W WO2013051677A1 WO 2013051677 A1 WO2013051677 A1 WO 2013051677A1 JP 2012075883 W JP2012075883 W JP 2012075883W WO 2013051677 A1 WO2013051677 A1 WO 2013051677A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication
value
signal
information
predetermined time
Prior art date
Application number
PCT/JP2012/075883
Other languages
French (fr)
Japanese (ja)
Inventor
大祐 梅原
石河 伸一
坪内 利康
Original Assignee
国立大学法人京都工芸繊維大学
株式会社オートネットワーク技術研究所
住友電装株式会社
住友電気工業株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from JP2011241621A external-priority patent/JP2013098871A/en
Priority claimed from JP2012047060A external-priority patent/JP2013093827A/en
Application filed by 国立大学法人京都工芸繊維大学, 株式会社オートネットワーク技術研究所, 住友電装株式会社, 住友電気工業株式会社 filed Critical 国立大学法人京都工芸繊維大学
Publication of WO2013051677A1 publication Critical patent/WO2013051677A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L25/00Baseband systems
    • H04L25/02Details ; arrangements for supplying electrical power along data transmission lines
    • H04L25/0264Arrangements for coupling to transmission lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L25/00Baseband systems
    • H04L25/02Details ; arrangements for supplying electrical power along data transmission lines
    • H04L25/08Modifications for reducing interference; Modifications for reducing effects due to line faults ; Receiver end arrangements for detecting or overcoming line faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Definitions

  • the present invention relates to a communication system, a communication apparatus, a communication method, and a communication parameter capable of detecting a collision of information transmission with respect to a communication line while a plurality of communication apparatuses connected to a common communication line can mutually transmit and receive information. Regarding the determination method.
  • a CAN (ControllerCAArea Network) communication protocol has been widely adopted for communication between a plurality of electronic devices (communication devices) mounted on a vehicle (see Non-Patent Documents 1 and 2).
  • a CAN communication protocol since a plurality of communication devices are connected to a common CAN bus, when a plurality of communication devices transmit information simultaneously and a collision occurs, an arbitration process ( Arbitration) is performed, and information transmission with a high priority is executed.
  • an arbitration process Arbitration
  • each communication device outputs a transmission signal to the CAN bus and simultaneously detects the signal level of the CAN bus, and the signal level of the detected signal relative to the transmission signal output by itself is detected.
  • a twisted line is used as a communication line, and each communication device performs communication using a differential signal, and a case where a potential difference between twisted lines exceeds a threshold is dominant. And a recessive case where the potential difference does not exceed the threshold value.
  • the dominant is associated with data 0 and the recessive is associated with data 1.
  • 26 and 27 are waveforms when the signal is changed from dominant to recessive on the CAN bus. As shown in the figure, when the transmission signal output from the communication device to the CAN bus is changed from dominant to recessive, a waveform that oscillates while the signal level (potential difference) on the CAN bus gradually attenuates is generated. This is because it is necessary to provide many branch portions in the CAN bus in order to connect many communication devices, and signal reflection is repeated due to factors such as impedance mismatch in this branch portion. Called ringing.
  • each communication device cannot make a dominant / recessive determination until the ringing signal level is attenuated to some extent.
  • the time during which the ringing signal level attenuates varies depending on the length of the branch line that branches the CAN bus.
  • the ringing signal level varies depending on the number of communication devices connected to the CAN bus. For this reason, each communication device needs to make a dominant / recessive decision after waiting for a time period during which ringing is considered to be sufficiently attenuated in consideration of the number of communication devices in the communication system, the length of the branch line, and the like.
  • the conventional communication system using the CAN protocol has a problem in that speeding up of communication is hindered by the influence of ringing.
  • the present invention has been made in view of such circumstances, and its object is to reduce the influence of ringing and realize a communication system, communication apparatus, communication method, and communication parameter capable of realizing high-speed communication. To provide a decision method.
  • the communication system includes a plurality of communication devices connected via a common communication line, and each communication device is represented by a binary value of a dominant value or an inferior value via the communication line.
  • the communication means is predetermined over a predetermined time Tp shorter than the information transmission time of 1 bit with respect to the superiority value of the information to be transmitted. After outputting a pulse signal of a signal level to the communication line, the signal output to the communication line is not performed, and the signal output to the communication line is not performed for the inferior value of the information to be transmitted. It is characterized by.
  • the communication system includes a plurality of communication devices connected via a common communication line, and each communication device has a binary value with each bit being a dominant value or an inferior value via the communication line.
  • the communication means has a first predetermined time shorter than the information transmission time for one bit with respect to the superiority value of the information to be transmitted.
  • Information that outputs a signal having a second signal level lower than the first signal level over a second predetermined time Th that is shorter than the information transmission time after outputting a signal having the first signal level over Tp A signal output to the communication line is not performed with respect to the inferior value.
  • the communication device connects / disconnects the other end of the resistor, one end of which is connected to a fixed potential, with respect to the communication line, and the information for one bit.
  • switching control means for controlling the switching unit to connect the resistor after the first predetermined time Tp has elapsed in the transmission time.
  • the first predetermined time Tp and the second predetermined time Th satisfy the conditions of Tp + Th ⁇ Tb and Th ⁇ 2 ⁇ L ⁇ A (where Tb is 1 bit of information transmission time, L is the shortest distance of the communication line interposed from one communication apparatus to another communication apparatus, and A is signal transmission per unit length of the communication line It is time.)
  • the communication device when the communication device outputs information related to the superiority value or the inferiority value to the communication line, the signal level in the communication line over a predetermined sampling period Td.
  • a plurality of times of sampling, and calculating means for calculating an average value of the signal level in the predetermined sampling period Td, and a signal transmitted to the communication line according to the average value calculated by the calculating means Determining means for determining which of the recessive values, and detecting means for detecting information transmission from other communication devices when the determining means determines that it is a dominant value after transmitting the information of the recessive value It is characterized by having.
  • the communication device when the communication device outputs information related to the superiority value or the inferiority value to the communication line, the signal level in the communication line over a predetermined sampling period Td.
  • the comparison means for performing sampling of a plurality of times and comparing the signal level of each sampling result with a threshold value, and based on the comparison result of the comparison means, the number of samples whose signal level exceeds the threshold value and the signal level exceeds the threshold value
  • a determination unit that determines whether a signal transmitted to the communication line is a dominant value or an inferior value according to the number of samples that is not present, and the determination unit is a dominant value after transmitting information on the recessive value
  • a detection unit that detects transmission of information from another communication device when the determination is made.
  • the communication device sequentially transmits information of a plurality of dominant values having different predetermined times Tp, and different predetermined sampling periods with respect to the information transmitted by the test transmission unit.
  • Sampling over Td and making a determination by the determination means evaluating means for evaluating the reception result for a combination of the predetermined time Tp and the predetermined sampling period Td, and each predetermined time based on the evaluation result by the evaluation means
  • Selecting means for selecting a predetermined sampling period Td having a high evaluation with respect to Tp, wherein one communication apparatus performs transmission by the test transmission means, and each communication apparatus performs evaluation by the evaluation means and by the selection means.
  • the process of selecting is performed for all communication devices in order, and based on the selection result by the selecting means of each communication device, a predetermined time Characterized in that you have to determine the p and a predetermined sampling period Td.
  • the communication system according to the present invention is characterized in that the test transmission means transmits the information of the dominant value and the information of the inferior value alternately.
  • the evaluation unit calculates an evaluation value corresponding to the number of the dominant value information determined as the dominant value, the number of the recessive value information determined as the dominant value, and the sampling number. It is characterized by being.
  • the plurality of communication devices include one master communication device and a plurality of slave communication devices, and the slave communication device corresponds to the evaluation unit corresponding to the sorting result of the sorting unit.
  • Evaluation result transmission means for transmitting the evaluation result to the master communication device, wherein the master communication device receives the evaluation result transmitted by the plurality of slave communication devices, and receives the evaluation result.
  • a predetermined time determining means for determining the predetermined time Tp based on a plurality of evaluation results received by the means; and a predetermined time for transmitting information on the predetermined time Tp determined by the predetermined time determining means to the plurality of slave communication devices.
  • the slave communication device further includes a predetermined time information receiving unit for receiving information of the predetermined time Tp transmitted by the predetermined time information transmitting unit, and the predetermined time information receiving unit receives the information. Place At time Tp, characterized in that are to perform the subsequent signal output by said communication means.
  • the main communication device includes predetermined sampling period determining means for determining the predetermined sampling period Td in accordance with the predetermined time Tp determined by the predetermined time determining means. Subsequent sampling is performed in the predetermined sampling period Td determined by the sampling period determining means, and the slave communication device is configured to perform the predetermined sampling period according to the predetermined time Tp received by the predetermined time information receiving means. It has a predetermined sampling period determining means for determining Td, and the subsequent sampling is performed in the predetermined sampling period Td determined by the predetermined sampling period determining means.
  • the communication device is connected to another device via a common communication line, and each bit is represented by two or more consecutive bits represented by a binary value of a dominant value or a recessive value via the communication line.
  • the communication unit outputs a pulse signal having a predetermined signal level over a predetermined time Tp shorter than an information transmission time of 1 bit with respect to a superiority value of information to be transmitted. After output to the communication line, signal output to the communication line is not performed, and signal output to the communication line is not performed for the inferior value of the information to be transmitted.
  • the communication device is connected to another device via a common communication line, and each bit is represented by two or more consecutive bits represented by a binary value of a dominant value or a recessive value via the communication line.
  • the communication means has a first signal level over a first predetermined time Tp shorter than an information transmission time for one bit with respect to a superiority value of information to be transmitted. After outputting a signal, a signal having a second signal level lower than the first signal level is output for a second predetermined time Th shorter than the information transmission time, and the communication with respect to the inferior value of the information to be transmitted The signal output to the line is not performed.
  • the communication device performs sampling of the signal level in the communication line a plurality of times over a predetermined sampling period Td when the communication means outputs information relating to the dominant value or the inferior value to the communication line.
  • calculating means for calculating an average value of the signal level during the predetermined sampling period Td, and depending on the average value calculated by the calculating means, the signal transmitted to the communication line is either a dominant value or a recessive value.
  • a determination unit that determines whether or not there is a detection unit that detects transmission of information from another communication device when the determination unit determines that the determination is a dominant value after transmitting the information of the recessive value.
  • the communication device performs sampling of the signal level in the communication line a plurality of times over a predetermined sampling period Td when the communication means outputs information relating to the dominant value or the inferior value to the communication line.
  • comparing means for comparing the signal level of each sampling result with a threshold, and based on the comparison result of the comparing means, the number of samples whose signal level exceeds the threshold and the number of samples whose signal level does not exceed the threshold
  • determining means for determining whether the signal transmitted to the communication line is a dominant value or an inferior value, and determining that the determining means is a dominant value after transmitting the information of the inferior value, And detecting means for detecting information transmission from another communication device.
  • the communication apparatus also includes a test transmission unit that sequentially transmits information of a plurality of dominant values having different predetermined times Tp, and sampling over different predetermined sampling periods Td with respect to the information transmitted by the test transmission unit. Evaluation is performed by the determination means, and evaluation means for evaluating the reception result for the combination of the predetermined time Tp and the predetermined sampling period Td, and the evaluation is high for each predetermined time Tp based on the evaluation result by the evaluation means And a selecting means for selecting a predetermined sampling period Td.
  • the communication method according to the present invention is a communication method for transmitting and receiving information of a plurality of consecutive bits each represented by a binary value of a dominant value or a recessive value via a common communication line.
  • Information to be transmitted without outputting a signal to the communication line after outputting a pulse signal of a predetermined signal level to the communication line over a predetermined time Tp shorter than the information transmission time of 1 bit with respect to the dominant value.
  • the signal output to the communication line is not performed with respect to the inferior value.
  • the communication method according to the present invention is a communication method for transmitting and receiving information of a plurality of consecutive bits each represented by a binary value of a dominant value or a recessive value via a common communication line. After outputting the signal of the first signal level over the first predetermined time Tp shorter than the information transmission time for 1 bit with respect to the dominant value, over the second predetermined time Th shorter than the information transmission time. A signal having a second signal level lower than the first signal level is output, and signal output to the communication line is not performed for the inferior value of information to be transmitted.
  • the communication parameter determination method is a communication parameter determination method for determining the predetermined time Tp and the predetermined sampling period Td in the communication system described above, wherein the predetermined time Tp is determined by one communication apparatus.
  • Information of a plurality of different dominant values is transmitted in order, the information transmitted by the one communication device is sampled over a different predetermined sampling period Td and determined by the determination means, and the predetermined time Tp and the predetermined sampling period
  • the reception result for the combination of Td is evaluated, and based on the evaluation result, a predetermined sampling period Td that is highly evaluated for each predetermined time Tp is selected, and transmission of one communication device is performed.
  • the process of selecting is performed in order for all communication devices, and based on the selection result of each communication device, the predetermined time Tp and the predetermined And determining a sampling period Td.
  • the communication apparatus when the information to be transmitted is dominant (dominant value), the communication apparatus has a high level (predetermined signal level) over a predetermined time Tp shorter than this time with respect to the information transmission time of 1 bit.
  • the signal is output to the communication line, and then the signal output to the communication line is stopped (becomes a high impedance state).
  • the communication device When the information to be transmitted is recessive (inferior value), the communication device does not output a signal to the communication line (becomes a high impedance state).
  • ringing occurs when transmission of the communication apparatus is changed from dominant to recessive.
  • the communication device outputs a high level signal (a signal having a predetermined potential difference) to the communication line as a dominant transmission, and then becomes recessive and enters a high impedance state.
  • the signal change from dominant to recessive by one communication device is reflected by another communication device in recessive (high impedance state), and this reflection is further reflected by the one communication device that has transitioned to recessive. Reflection occurs and ringing occurs.
  • the communication apparatus when the information to be transmitted is a dominant (dominant value), the communication apparatus performs the first signal level over a first predetermined time Tp shorter than this time with respect to the information transmission time of 1 bit. After the signal is output, a signal of the second signal level ( ⁇ first signal level) over the second predetermined time Th is output to the communication line. That is, the communication apparatus outputs a pulse-like signal that changes from the first signal level to the second signal level in response to the dominant.
  • the communication device When the information to be transmitted is recessive (inferior value), the communication device does not output a signal to the communication line (becomes a high impedance state).
  • the device can detect the presence of the communication device that has transmitted the dominant.
  • the communication apparatus which transmitted recessive can suppress generation
  • the signal level is lowered from the first signal level to the second signal level, and then the state is shifted to the high impedance state.
  • the amplitude of the signal reflected by the communication line can be reduced, and further, by setting the second signal level to approximately 0V, the amplitude of the reflected signal can be approximately 0V. Can be suppressed. As a result, the influence of ringing on the next bit to which the communication apparatus has transmitted a dominant can be reduced, so that dominant / recessive determination can be performed at an early timing for each bit. Therefore, high-speed communication can be realized.
  • a main communication line (main line) is branched to provide a branch line, and the communication apparatus is connected to the end of the main line or branch line.
  • a switching unit such as a switch for connecting / cutting off a resistor connected to a fixed potential such as a ground potential is provided for a communication line to which each communication device is connected.
  • Each communication apparatus controls the switching unit to connect the resistor after the first predetermined time TP in the 1-bit transmission time has elapsed.
  • each communication device in the communication system can connect the resistor to the communication line after the elapse of the first predetermined time Tp in the 1-bit transmission time, and perform impedance matching by the resistor.
  • impedance mismatching which is a cause of ringing, can be eliminated, and ringing can be suppressed.
  • the ringing occurs when a signal output from one communication device is reflected by another communication device, the ringing is the closest to one communication device (the distance of the communication line through which the signal propagates is the shortest).
  • the communication device has a great influence on the occurrence of ringing. Therefore, in the present invention, when the shortest distance of the communication line interposed between two communication devices included in the communication system is L and the transmission time per unit length of the communication line is A, the second predetermined time. Th is Th ⁇ 2 ⁇ L ⁇ A Set to satisfy the conditions. Note that 2 ⁇ L is a round trip distance between two communication devices, and 2 ⁇ L ⁇ A is a time until a signal output from one communication device is reflected by another communication device and returned to the one communication device. It is.
  • the second predetermined time Th is, when the information transmission time for 1 bit is Tb, Tp + Th ⁇ Tb It is necessary to set so as to satisfy the conditions.
  • the communication line when the communication apparatus outputs the above signal to the communication line, the communication line performs sampling of the signal level of the communication line a plurality of times over a predetermined sampling period Td, and the signal level is obtained from the sampling results of the plurality of times.
  • the average value of is calculated.
  • the communication apparatus performs sampling over a time that is about the same as the output time (predetermined time Tp) of the signal output as the dominant. Accordingly, when the signal on the communication line is dominant, the communication apparatus can calculate a value approximately equal to the signal level of the signal output as the dominant as the average value of the signal level.
  • the communication device can calculate a value in the vicinity of 0 V as the average value of the signal level.
  • the communication device determines whether the signal on the communication line is dominant / recessive, for example, depending on whether the average value of the calculated signal level exceeds a threshold value, and transmits communication information by itself. When the signal on the communication line is later determined to be dominant, it is detected that the information transmission has collided. As a result, the communication device can reduce the influence of ringing and detect a signal transmitted by another communication device.
  • the communication apparatus when the communication apparatus outputs the above signal to the communication line, the signal level of the communication line is sampled a plurality of times over a predetermined sampling period Td, and the signal level and threshold value of each sampling result are obtained. Compare with. From the result of this comparison, the number of samples whose signal level exceeds the threshold is compared with the number of samples whose signal level does not exceed the threshold, and it is determined whether the signal on the communication line is dominant or recessive by so-called majority decision. To do. For example, the communication apparatus performs sampling over a time that is about the same as the output time (predetermined pulse width) of a signal output as a dominant.
  • the comparison between the sampling result and the threshold value can be easily performed by inputting the signal level of the sampling result to a simple CMOS (Complementary Metal Oxide Semiconductor) circuit and acquiring the output binary signal.
  • CMOS Complementary Metal Oxide Semiconductor
  • the communication device can detect that another communication device has transmitted the dominant signal.
  • One communication apparatus sequentially transmits information of a plurality of dominant values having different predetermined times Tp.
  • Each communication apparatus performs information reception processing by sampling information transmitted in sequence by one communication apparatus a plurality of times at different predetermined sampling periods Td.
  • one communication apparatus sequentially transmits information of dominance values by changing the predetermined time Tp such as predetermined times Tp1, Tp1, Tp1, Tp2, Tp2, Tp2, Tp3, Tp3, and Tp3.
  • each communication apparatus performs sampling in order by changing the predetermined sampling period Td like the predetermined sampling periods Td1, Td2, Td3, Td1, Td2, Td3, Td1, Td2, and Td3.
  • each communication apparatus evaluates the reception result of each combination, and selects a predetermined sampling period Td having a high evaluation for each predetermined time Tp based on the evaluation result.
  • one predetermined sampling period Td1, Td2, Td3 that is highly evaluated for each predetermined time Tp1, Tp2, Tp3 is selected, and three combinations of the predetermined time Tp and the predetermined sampling period Td are selected as the sorting results. can get.
  • the communication devices that perform trial information transmission as one communication device are sequentially changed, the same processing is performed for all the communication devices, and finally, the predetermined time Tp and the predetermined sampling period Td are determined from these processing results. . Accordingly, transmission / reception of trial information between communication devices of the communication system can be performed under various conditions of communication parameters, and each communication device can determine which condition is suitable.
  • one communication apparatus when transmitting / receiving experimental information as described above, one communication apparatus alternately transmits dominant value information and inferior value information. Thereby, trial information is transmitted and received under an unfavorable condition in which ringing is likely to occur, and a more appropriate communication parameter can be determined.
  • the number (D0) in which the information on the dominant value is determined as the dominant value (D0) and the number in which the information on the inferior value is determined as the dominant value ( R0) and an evaluation value (for example, (D0 ⁇ R0) / Pd) corresponding to the number of samplings (Pd) performed during the sampling period are calculated.
  • Each communication device can select a predetermined sampling period Td suitable for the predetermined time Tp according to the calculated evaluation value.
  • the communication system includes one master communication device and a plurality of slave communication devices.
  • the slave communication device performs the evaluation and selection as described above, and transmits an evaluation result corresponding to the selection result to the main communication device.
  • the main communication device receives the evaluation result from each slave communication device, and determines one predetermined time Tp as the predetermined time Tp used in the subsequent communication based on the evaluation result.
  • the master communication device transmits the determined predetermined time Tp to each slave communication device.
  • Each slave communication device outputs a signal for subsequent information transmission at a predetermined time Tp received from the master communication device.
  • the evaluation results of the respective slave communication devices can be aggregated in the main communication device to determine the predetermined time Tp, and all communication devices can perform subsequent communication at the common predetermined time Tp.
  • each slave communication device determines a predetermined sampling period Td according to the predetermined time Tp received from the main communication device. Since each slave communication device has already selected a predetermined sampling period Td that is highly evaluated with respect to the predetermined time Tp, by selecting the predetermined sampling period Td corresponding to the predetermined time Tp from the selection result, the predetermined sampling period Td Can be determined.
  • the predetermined sampling period Td may be different for each communication device.
  • the present invention by adopting a configuration in which a signal shorter than the information transmission time for one bit is output as a dominant, the influence of ringing on the next bit of information to be transmitted can be reduced. Since recessive determination can be performed at an early timing, communication that requires arbitration such as the CAN protocol can be speeded up.
  • the communication apparatus outputs a signal having the second signal level for the second predetermined time Th after the first signal level signal output for the first predetermined time Tp for the dominant information transmission. Since the output configuration can suppress the occurrence of ringing within one bit of transmission data, it is possible to perform dominant / recessive determination at each bit at an early timing, as in the CAN protocol. Communication that performs arbitration can be accelerated.
  • each communication device transmits and receives experimental information and determines the communication parameters for the predetermined time Tp and the predetermined sampling period Td, for example, when the number of communication devices increases or decreases, or Even when the communication characteristics change due to secular change or the like, communication parameters suitable for the changed communication characteristics can be automatically determined.
  • 10 is a flowchart illustrating a procedure of reception processing by a reception unit according to the second embodiment.
  • 10 is a flowchart illustrating a procedure of reception processing by a reception unit according to the second embodiment. It is a schematic diagram for demonstrating the test signal output by an automatic setting process. It is a schematic diagram for demonstrating the sampling performed in an automatic setting process. It is a schematic diagram which shows an example of the selection result memorize
  • FIG. 10 is a schematic diagram for explaining signals transmitted and received by each ECU in a communication system according to a fourth embodiment.
  • FIG. 10 is a schematic diagram for explaining impedance matching by a CAN communication control unit according to a fourth embodiment. It is a schematic diagram for demonstrating the 1st predetermined time and 2nd predetermined time which concern on data transmission.
  • 10 is a flowchart illustrating a procedure of transmission processing by a CAN communication control unit according to the fourth embodiment.
  • 10 is a flowchart illustrating a procedure of transmission processing by a CAN communication control unit according to the fourth embodiment.
  • FIG. 10 is a flowchart illustrating a procedure of reception processing by a CAN communication control unit according to the fourth embodiment.
  • 10 is a flowchart illustrating a procedure of reception processing by a CAN communication control unit according to the fourth embodiment.
  • FIG. 10 is a schematic diagram for explaining an effect of a communication system according to a fourth embodiment. It is a schematic diagram which shows an example of the signal waveform in the conventional communication system. It is a schematic diagram which shows an example of the signal waveform in the conventional communication system.
  • FIG. 1 is a schematic diagram illustrating a configuration example of a communication system.
  • the communication system includes, for example, a plurality of ECUs (Electronic Control Units) 1 mounted on a vehicle (not shown) as a communication device, and the plurality of ECUs 1 are connected via a common communication line 5. is there.
  • the plurality of ECUs 1 are distinguished from each other by being denoted by reference numerals 1a to 1e, and the communication line 5 is distinguished into a trunk line 5a and branch lines 5b to 5d.
  • the illustrated communication system has a configuration in which ECUs 1a and 1e are connected via a trunk line 5a, and ECUs 1b to 1d are connected to three branch lines 5b to 5d branched from the trunk line 5a of the communication line 5, respectively.
  • this signal passes from the branch line 5b to the ECU 1c via the trunk line 5a and the branch line 5c, and the reflected wave reflected by the terminal portion of the ECU 1c or the like Then, it reaches the ECU 1b via the trunk line 5a and the branch line 5b (see the broken arrow in FIG. 1).
  • a similar reflected wave is also generated in the ECU 1d. By repeating such signal reflection, ringing as shown in FIGS. 26 and 27 occurs. As the distance between the branch lines 5b to 5d becomes longer, the time until the reflected wave returns to the signal output source becomes longer.
  • the period of ringing becomes longer, and the time for ringing to continue (the time required for attenuation) becomes longer.
  • the number of branch lines 5b to 5d of the communication line 5 increases (the number of ECUs 1 increases)
  • the number of reflected wave generation points increases, so that the ringing amplitude increases and the time required for the ringing to attenuate is increased. become longer.
  • FIG. 2 is a block diagram showing the configuration of the communication device (ECU 1).
  • the ECU 1 includes a control unit 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, an input unit 14, an output unit 15, a CAN communication control unit 16, and the like.
  • the control unit 11 is configured by using an arithmetic processing unit such as a CPU (Central Processing Unit) or an MPU (Micro Processing Unit), and performs various controls by reading and executing a control program stored in the ROM 12. Processing can be performed.
  • arithmetic processing unit such as a CPU (Central Processing Unit) or an MPU (Micro Processing Unit
  • the ROM 12 is composed of a nonvolatile memory element such as an EEPROM (Electrically Erasable Programmable ROM) or a flash memory, for example, and a control program executed by the control unit 11 and information necessary for processing performed by the control unit 11. Etc. are stored in advance.
  • the RAM 13 is configured by a memory element such as SRAM (Static RAM) or DRAM (Dynamic RAM), for example, and information generated by processing of the control unit 11 and information transmitted to and received from other ECUs 1. Etc. are stored.
  • the input unit 14 receives a signal from an input device such as a sensor such as a vehicle speed sensor or a temperature sensor of a vehicle, or various switches for operation arranged inside and outside the vehicle, and performs sampling of the input signal or A / Information obtained by performing processing such as D conversion is given to the control unit 11.
  • the output unit 15 is connected to a load such as a motor or a lamp, and outputs a drive signal for driving these loads in response to an instruction from the control unit 11. Note that the ECU 1 does not necessarily need to include both the input unit 14 and the output unit 15, and may be configured to include only one of them.
  • the CAN communication control unit 16 has a terminal connected to the communication line 5, and transmits / receives information to / from another ECU 1 according to the CAN protocol via the communication line 5 connected to the terminal. Is.
  • the CAN communication control unit 16 converts the transmission information given from the control unit 11 into transmission data (frame) according to the CAN protocol and gives the data to the transmission unit 17.
  • the transmission unit 17 of the CAN communication control unit 16 outputs a signal to the communication line 5 according to the value of each bit of the given transmission data (0 (dominant) or 1 (recessive)).
  • a twist line is used as the communication line 5, and the transmission unit 17 outputs a differential signal to the communication line 5.
  • the transmission unit 17 sequentially processes each bit of the transmission data composed of a plurality of bits, and when the value of the processing target bit is dominant, outputs a short signal of a predetermined signal level, and then sets the terminal to a high impedance state. When the value of the processing target bit is recessive, the terminal is set to a high impedance state.
  • the CAN communication control unit 16 determines whether the signal transmitted on the communication line 5 is a signal corresponding to dominant / recessive by detecting the signal level of the communication line 5 (potential difference of the twist line).
  • the receiving unit 18 receives data in which each bit is represented by a dominant / recessive binary value.
  • the CAN communication control unit 16 gives the data received by the receiving unit 18 to the control unit 11.
  • the CAN communication control unit 16 receives the data transmitted by the transmission unit 17 at the reception unit 18, and when the transmission data and the reception data do not match (the recessiveness of the transmission data changes to dominant in the reception data). In the case where a collision has occurred with the transmission of another ECU 1 connected to the communication line 5, arbitration processing is performed.
  • the arbitration process performed by the ECU 1 is the same as that performed by the conventional CAN protocol, and thus detailed description thereof is omitted.
  • FIG. 3 is a schematic diagram for explaining a signal transmitted and received by each ECU 1 in the communication system according to the present invention.
  • the vertical axis represents a potential difference [V] between twist lines of the communication line 5 and the horizontal axis represents time [n. [Second].
  • the transmission signal is shown in the upper part and the reception signal is shown in the lower part.
  • the ECU 1 performs a communication according to the CAN protocol at a communication speed of 1 Mbps, that is, a communication system with a 1-bit data transmission time of 1000 ns.
  • waveforms are shown when the transmission unit 17 outputs a signal corresponding to dominant from 0 ns to 1000 ns and outputs a signal corresponding to recessive from 1000 ns to 2000 ns.
  • the transmission unit 17 of the ECU 1 When transmitting the dominant data, the transmission unit 17 of the ECU 1 outputs a signal (pulse signal) of a predetermined signal level (2 V) during a period from the start time to 400 ns in the 1-bit transmission time 1000 ns, and then 400 ns. During a period of ⁇ 1000 ns, no signal is output and the terminal is in a high impedance state. Further, when performing the recessive data transmission, the transmission unit 17 sets the terminal in a high impedance state without outputting a signal for the entire transmission time of 1 bit (period of 1000 ns to 2000 ns in FIG. 3).
  • the signal on the communication line 5 When the transmitter 17 outputs the above signal to the communication line 5, the signal on the communication line 5 has a waveform as shown in the lower part of FIG. During the period from 0 ns to 400 ns when the transmitter 17 outputs a signal of a predetermined signal level, the signal on the communication line 5 has a distorted waveform in the vicinity of the predetermined signal level. Further, during a period of 400 ns to 2000 ns in which the transmission unit 17 puts the terminal in a high impedance state, the signal on the communication line 5 vibrates around about 0V and gradually attenuates over time, that is, a ringing waveform. Become.
  • the reception unit 18 of the ECU 1 samples the signal level of the communication line 5 at a cycle of 5 ns, for example, over a predetermined period (for example, 400 ns) from the start time of the transmission time 1000 ns of each bit.
  • the receiving unit 18 calculates an average value of the signal level from the sampling result of a predetermined period, and performs dominant / recessive determination according to whether or not the calculated average value exceeds a predetermined threshold value.
  • the average signal level from 0 ns to 400 ns is about 1.7 V
  • the receiving unit 18 performs determination using, for example, 1 V as a threshold, so that dominant transmission is performed during the period from 0 ns to 1000 ns. It is determined that The average of the signal levels from 1000 ns to 1400 ns is about 0 V, and the receiving unit 18 determines that recessive transmission is performed during this period.
  • Condition 1 shown in FIG. 4A is a condition in which the distance from the transmission-side ECU 1 to the reception-side ECU 1 is long and signal propagation delay is severe.
  • Condition 2 shown in FIG. 4B is a condition in which ringing is severe.
  • the ECU 1 receives a signal transmitted by itself, the length of the branch line of the communication line 5 to which the ECU 1 is connected is 2 m, and the load impedance of the ECU 1 is 40 k ⁇ .
  • the bit error rate BER is calculated by the following equation (1).
  • A1 indicates an average value of the signal level calculated by the receiving unit 18 with the signal corresponding to the dominant
  • A0 indicates an average value of the signal level calculated by the receiving unit 18 with the signal corresponding to the recessive.
  • Ts indicates the sampling time
  • erfc () is a complementary error function.
  • FIG. 5 is a graph showing the simulation results, in which the horizontal axis is the pulse width Tp and the vertical axis is the bit error rate.
  • the simulation result under condition 1 is indicated by a broken line
  • the simulation result under condition 2 is indicated by a one-dot chain line
  • the average of both conditions is indicated by a solid line.
  • FIG. 6 is a flowchart showing a procedure of transmission processing by the transmission unit 17.
  • the transmission unit 17 of the CAN communication control unit 16 first acquires 1-bit information to be transmitted from the data to be transmitted (step S1), and determines whether or not this 1-bit is dominant (step S1). Step S2). If 1 bit to be transmitted is dominant (S2: YES), the transmission unit 17 outputs a signal at a predetermined signal level to the communication line 5 (step S3). Next, the transmitter 17 further determines whether or not a time (predetermined time Tp) corresponding to the pulse width Tp determined from the start of output of this signal has passed (step S4), and the time corresponding to the pulse width Tp. If it has not elapsed (S4: NO), the process returns to step S3 to continue signal output.
  • predetermined time Tp a time corresponding to the pulse width Tp determined from the start of output of this signal has passed
  • the transmission unit 17 stops signal output and places the terminal in a high impedance state (step S5).
  • the transmission unit 17 sets the terminal in a high impedance state without performing signal output (step S5).
  • the transmission unit 17 determines whether or not the 1-bit transmission time has elapsed (step S6). If the 1-bit transmission time has not elapsed (S6: NO), the process proceeds to step S5. Return and continue high impedance state.
  • the transmission unit 17 When the transmission time of 1 bit has elapsed (S6: YES), the transmission unit 17 further determines whether or not to end transmission by determining whether or not transmission of all the bits of the transmission data has been completed. (Step S7). When it determines with not complete
  • FIG. 7 is a flowchart showing a procedure of reception processing by the reception unit 18.
  • the receiving unit 18 of the CAN communication control unit 16 determines whether or not the signal level of the communication line 5 has exceeded a predetermined threshold (step S20), and if the signal level does not exceed the threshold (S20: NO), Wait until the signal level exceeds the threshold.
  • the receiving unit 18 samples the signal level of the communication line 5 (step S21), and determines whether the sampling period Td has elapsed since the start of sampling (step S21). Step S22). If it is determined that the sampling period Td has not elapsed (S22: NO), the receiving unit 18 returns the process to step S21 and repeats sampling of the signal level.
  • the receiving unit 18 calculates an average value of a plurality of signal levels sampled in the sampling period Td (step S23), and the calculated average value is determined in advance. It is determined whether or not the determined threshold value is exceeded (step S24). When it determines with the average value of a signal level exceeding a threshold value (S24: YES), the receiving part 18 determines with the received signal corresponding to a dominant (step S25), and advances a process to step S27. When it is determined that the average signal level does not exceed the threshold (S24: NO), the receiving unit 18 determines that the received signal corresponds to recessive (step S26), and the process proceeds to step S29. Proceed.
  • the reception unit 18 determines whether or not the transmission unit 17 was performing recessive transmission during the period during which the signal was sampled (step S25). S27).
  • the transmission unit 17 is performing recessive transmission (S27: YES)
  • the reception unit 18 detects that another ECU 1 has transmitted a signal (step S28). )
  • the process proceeds to step S29. If the transmission unit 17 is not performing recessive transmission (S27: NO), the reception unit 18 proceeds to step S29 without detecting the signal transmission of the other ECU1.
  • the receiving unit 18 determines whether or not the 1-bit transmission time has elapsed (step S29). If the 1-bit transmission time has not elapsed (S29: NO), this time has elapsed. Wait until. When the transmission time of 1 bit has elapsed (S29: YES), the reception unit 18 returns the process to step S20 and performs the same reception process for the next bit.
  • the transmission unit 17 of the ECU 1 outputs a signal of a predetermined signal level over the pulse width Tp shorter than the transmission time of 1 bit to the communication line 5 when the transmission data is dominant, and then Stops the signal output to the communication line 5 to be in a high impedance state, and when the transmission data is recessive, does not output a signal to the communication line 5 to be in a high impedance state.
  • the ringing can be attenuated until the transmission time of the next bit, so that the dominant / recessive determination in each bit can be performed quickly. It is possible to perform at the timing, and it is possible to realize high speed communication.
  • the receiving unit 18 of the ECU 1 samples the signal level of the communication line 5 over the sampling period Td, calculates an average value of the sampled signal levels, and depending on whether the calculated average value exceeds a threshold value.
  • the communication system is mounted on the vehicle, but the present invention is not limited to this.
  • the configuration of the communication system shown in FIG. 1 (the number of ECUs 1, the connection form of the ECU 1, etc.) is merely an example, and the present invention is not limited to this.
  • the twisted line is used as the communication line 5
  • the present invention is not limited to this, and other structures such as using one cable as the communication line 5 may be used.
  • the receiving unit 18 of the ECU 1 samples the signal level of the communication line 5, calculates the average value of the signal level of the sampling result, and whether or not this average value exceeds the threshold value. In this configuration, dominant / recessive determination is performed.
  • the communication system according to the second embodiment is similar in that the reception unit 18 of the ECU 1 samples the signal level of the communication line 5, but the subsequent dominant / recessive determination method is different.
  • the receiving unit 18 compares the signal level of each sampling result with a threshold value, and depends on the number of samples whose signal level exceeds the threshold value and the number of samples whose signal level does not exceed the threshold value. The configuration is such that a majority decision is made and a dominant / recessive decision is made.
  • the receiving unit 18 of the ECU 1 sets the signal level of the communication line 5 over a predetermined period (for example, 400 ns) from the start point in the transmission time of each bit (for example, 1000 ns) for a predetermined period (for example, 5 ns period).
  • the signal level is compared with the threshold value at a predetermined cycle.
  • the receiving unit 18 can be configured such that the signal of the communication line 5 is input to the CMOS circuit, and acquires the signal output from the CMOS circuit at a predetermined period.
  • the receiving unit 18 includes two counters that count the comparison result between the signal level and the threshold value.
  • the number of samples whose signal level exceeds the threshold value and the number of samples whose signal level does not exceed the threshold value are respectively set. It counts with the counter.
  • the receiving unit 18 can be configured to count up one of the two counters in accordance with the output signal of the CMOS circuit.
  • the receiving unit 18 After the elapse of a predetermined period, the receiving unit 18 compares the values of the two counters. If the number of samples whose signal level exceeds the threshold is greater than the number of samples not exceeding the threshold, dominant transmission is performed during this period. It is determined that Further, when the number of samples whose signal level exceeds the threshold is smaller than the number of samples that does not exceed the threshold, the receiving unit 18 determines that recessive transmission has been performed during this period.
  • the amplitude (potential difference between twisted cables) of signals transmitted and received on the communication line 5 is set to 2.0 V
  • the determination level of the CMOS circuit of the receiving unit 18 is set to 0.9 V
  • the maximum signal delay is set to 0. 5 ⁇ s
  • the receiver 18 samples the signal level (output of the CMOS circuit) at a cycle of 100 ns.
  • the simulation of the communication system according to the second embodiment is performed for the two conditions shown in FIGS. 4A and 4B (where the distance between transmission and reception in the condition 2 is 0 m). Went.
  • FIG. 8 is a table showing the simulation results of the second embodiment.
  • the table shown in the figure shows each combination of Tp and Td when the pulse width Tp is changed from 0.1 ⁇ s to 1.0 ⁇ s at intervals of 0.1 ⁇ s and the sampling period Td is changed from 0.1 ⁇ s to 0.5 ⁇ s.
  • the simulation result is described as “correct” when communication can be performed without error and as “error” when an error occurs. Note that the combinations indicated by “ ⁇ ” in the table are not simulated (since the sampling period Td cannot be set longer than the pulse width Tp).
  • FIG. 9 and FIG. 10 are flowcharts showing a procedure of reception processing by the reception unit 18 of the second embodiment.
  • the receiving unit 18 performs processing using two counters, a D counter and an R counter.
  • the receiving unit 18 of the CAN communication unit 16 first initializes two counters, a D counter and an R counter (step S41).
  • the receiving unit 18 determines whether or not the signal level of the communication line 5 has exceeded a predetermined threshold (step S42), and if the signal level does not exceed the threshold (S42: NO), the signal level exceeds the threshold. Wait until it exceeds.
  • the reception unit 18 samples the signal level of the communication line 5 (step S43), and determines whether the signal level of the sampled signal exceeds the threshold. (Step S44). Note that the threshold value in step S42 and the threshold value in step S44 may be the same value.
  • the reception unit 18 counts up the D counter (step S45).
  • the reception unit 18 counts up the R counter. (Step S46).
  • the receiving unit 18 After counting up the D counter or the R counter, the receiving unit 18 determines whether or not the sampling period Td has elapsed from the start of sampling (step S47). When it is determined that the sampling period Td has not elapsed (S47: NO), the receiving unit 18 returns the process to step S43, and repeatedly performs sampling of the signal level and comparison with the threshold value.
  • the receiving unit 18 compares the values of the two counters and determines whether or not the value of the D counter exceeds the value of the R counter (step S48). ). If it is determined that the value of the D counter exceeds the value of the R counter (S48: YES), the receiving unit 18 determines that the received signal corresponds to a dominant (step S49), and the process proceeds to step S51. Proceed. If it is determined that the value of the D counter does not exceed the value of the R counter (S48: NO), the receiving unit 18 determines that the received signal corresponds to recessive (step S50), and proceeds to step S53. Proceed with the process.
  • the reception unit 18 determines whether or not the transmission unit 17 is performing a recessive transmission during the period during which the signal was sampled (step S49). S51).
  • the transmission unit 17 is performing recessive transmission (S51: YES)
  • the reception unit 18 detects that another ECU 1 has transmitted a signal (step S52). )
  • the process proceeds to step S53. If the transmission unit 17 is not performing recessive transmission (S51: NO), the reception unit 18 proceeds to step S53 without detecting the signal transmission of the other ECU1.
  • the receiving unit 18 determines whether or not the 1-bit transmission time has elapsed (step S53). If the 1-bit transmission time has not elapsed (S53: NO), this time has elapsed. Wait until. When the transmission time of 1 bit has elapsed (S53: YES), the reception unit 18 returns the process to step S41, and performs the same reception process for the next bit.
  • the receiving unit 18 of the ECU 1 samples the signal level of the communication line 5 over the sampling period Td, and the sampled signal level compares the threshold value with the threshold value.
  • the dominant / recessive determination is performed according to the number of samples whose signal level exceeds the threshold and the number of samples whose signal level does not exceed the threshold. Since the configuration of the communication system according to the second embodiment can facilitate the circuit configuration of the receiving unit 18 as compared with the configuration of the communication system according to the first embodiment, the price of the ECU 1 can be reduced. Can be realized.
  • the receiving unit 18 is configured to perform determination using two counters, but is not limited thereto, and may be configured to perform determination using one counter.
  • the counter can be counted up only when it is determined that the signal level exceeds the threshold, and it can be determined whether or not the value of the counter exceeds half of the total number of samplings. Further, for example, the counter can be counted up when it is determined that the signal level exceeds the threshold, and the counter can be counted down when it is determined that the signal level does not exceed the threshold.
  • the comparison between the signal level of the communication line 5 and the threshold value is performed by the CMOS circuit. However, the configuration is not limited to this, and the comparison may be performed by another circuit.
  • the value of the sampling period Td (predetermined sampling period Td) for sampling the signal level has a great influence on the communication performance.
  • the optimum pulse width Tp and sampling period Td are set in advance in each ECU 1 by measuring the characteristics of the communication system and calculating the optimum values before shipping the communication system (vehicle equipped with) to the factory, for example.
  • the pulse width Tp and the sampling period Td calculated and set in advance are optimal values, for example, when the number of ECUs 1 is increased / decreased due to addition / deletion of optional equipment of the vehicle, and the characteristics of the communication system change. There is a possibility of disappearing. Further, the communication characteristics may change due to the secular changes of the ECU 1 and the communication line 5 and the like, and the pulse width Tp and the sampling period Td calculated and set in advance may not be optimal values.
  • the communication system according to Embodiment 3 solves the above problem by providing an automatic setting function of the pulse width Tp and the sampling period Td.
  • This automatic setting process is performed at a vehicle dealer or factory, for example, when a vehicle equipped with a communication system is shipped from the factory, when the vehicle is inspected, or when the ECU 1 is added / deleted. .
  • each ECU 1 of the communication system stops the normal communication process.
  • one ECU 1 serves as a master ECU and the remaining ECU 1 serves as a slave ECU.
  • the function as the master ECU may be provided only in one ECU 1 in the communication system, or provided in a plurality of ECUs 1 and any one ECU 1 operates as a master ECU depending on the situation. Also good.
  • the ECU 1a is a master ECU, and the other ECUs 1b to 1e are slave ECUs.
  • the master ECU 1a is provided with an operation unit (not shown) for operating the automatic setting processing of the pulse width Tp and the sampling period Td, and an operator can operate the operation unit at a vehicle dealer or factory. By performing an operation on, automatic setting processing is started.
  • the master ECU 1a transmits an automatic setting process start command to the slave ECUs 1b to 1e via the communication line 5.
  • the slave ECUs 1b to 1e that have received this stop normal control processing and communication processing, and start automatic setting processing.
  • the automatic setting process start command transmitted by the master ECU 1a may be transmitted as data conforming to the CAN protocol, for example, and a specific signal different from the CAN protocol is output to the communication line 5, for example.
  • the slave ECUs 1b to 1e may be configured to detect the signal.
  • FIG. 11 is a schematic diagram for explaining a test signal output in the automatic setting process.
  • the master ECU 1a outputs a signal in which dominant and recessive are alternately connected as a test signal.
  • the test signal has a configuration in which N signal sequences from the Tp1 signal sequence to the TpN signal sequence are separated by a delimiter.
  • the delimiter is a signal sequence determined in advance as a delimiter.
  • the delimiter can be a signal in which a predetermined number of recessive signals are continuous.
  • the pulse widths of the pulse signals output as dominants are different in the Tpn signal sequence. That is, the dominant pulse width in the Tp1 signal train is Tp1, the dominant pulse width in the Tp2 signal train is Tp2,..., And the dominant pulse width in the TpN signal train is TpN.
  • the master ECU 1a outputs a test signal including L ⁇ N 2-bit strings of dominant and recessive to the communication line 5.
  • the master ECU 1a and the slave ECUs 1b to 1e sample the test signal output to the communication line 5.
  • FIG. 12 is a schematic diagram for explaining the sampling performed in the automatic setting process. As shown in the upper part of FIG. 12, in the Tpn signal sequence of the test signal, there are M consecutive dominant and recessive 2-bit sequences in which the dominant pulse width is set to Tpn.
  • Each of the ECUs 1a to 1e samples one dominant and recessive 2-bit string in the same sampling period Tdm, and samples the next 2-bit string in another sampling period Tdm. Accordingly, each of the ECUs 1a to 1e performs sampling twice in the same sampling period Tdm, like the sampling periods Td1, Td1, Td2, Td2,..., TdM, TdM. Since the test signal is a signal in which dominant and recessive are alternately repeated, by performing sampling twice in the same sampling period Tdm, each ECU 1a to 1e can perform dominant and recessive sampling in the same sampling period Tdm. it can.
  • Each of the ECUs 1a to 1e repeatedly samples the voltage value of the communication line 5 with a predetermined period of, for example, 5 ns during each sampling period Tdm, and a plurality of sampling results obtained by a plurality of samplings are obtained. Whether the signal on the communication line 5 is dominant or recessive based on (for example, based on the average value of the sampling results in the first embodiment and based on the majority decision of the sampling results in the second embodiment). Is judged. In the automatic setting process, each of the ECUs 1a to 1e calculates an evaluation value according to the following equation (2) from a plurality of sampling results obtained during each sampling period Tdm.
  • the evaluation value is calculated for the dominant and recessive sampling results performed in the same sampling period Tdm.
  • D0 is the number of sampling results in which the dominant signal is determined to be dominant
  • R0 is the number of sampling results in which the recessive signal is determined to be dominant
  • Pd is the number of samplings of dominant or recessive. is there.
  • the evaluation value ranges from ⁇ 1 to +1. If the evaluation value is greater than 0, dominant or recessive can be correctly determined by majority decision.
  • each of the ECUs 1a to 1e can calculate M evaluation values.
  • Each of the ECUs 1a to 1e selects the sampling period Tdm having the highest evaluation value. Since the test signal includes a signal sequence having N kinds of pulse widths Tpn, each ECU 1a to 1e can select one sampling period Tdm for each pulse width Tpn.
  • the sampling period Tdm is stored in the RAM 13 together with the pulse width Tpn and the evaluation value.
  • FIG. 13 is a schematic diagram showing an example of the sorting result stored in the RAM 13.
  • the output order of the test signals by the ECUs 1a to 1e may be any order.
  • the master ECU 1a first outputs the test signal, but it is not always necessary to start outputting the test signal from the master ECU 1a.
  • the test signals may be output according to a predetermined order for each of the ECUs 1a to 1e.
  • the ECUs 1a to 1e may output the test signals at random. In the configuration in which the test signals are output at random, when the plurality of ECUs 1a to 1e output the test signals simultaneously, for example, the output of the test signals may be stopped and the output may be performed again after a random waiting time has elapsed.
  • the master ECU 1a After the output of test signals by all the ECUs 1a to 1e is completed, the master ECU 1a sequentially requests the slave ECUs 1b to 1e to transmit the information stored in the RAM 13. In response to this request, the slave ECUs 1b to 1e read out the information stored in the RAM 13 and transmit it to the master ECU 1a.
  • the master ECU 1a receives information from all the slave ECUs 1b to 1e and stores it in the RAM 13. As a result, the RAM 13 of the master ECU 1a stores information such as L ⁇ L ⁇ N sampling periods and evaluation values including information created by itself.
  • the master ECU 1a determines the pulse width used in the subsequent communication based on the information stored in the RAM 13.
  • the master ECU 1a selects one pulse width from the N pulse widths Tpn based on the evaluation values included in the L ⁇ L ⁇ N pieces of information, but any selection method may be used. For example, for the L ⁇ L ⁇ N pieces of information, the master ECU 1a first excludes the pulse width Tpn whose evaluation value is equal to or less than the threshold from the selection target, and selects the pulse width Tpn having the largest average evaluation value of each pulse width Tpn. be able to. The master ECU 1a notifies the selected one pulse width Tpn to the slave ECUs 1b to 1e by broadcast or the like.
  • Each of the slave ECUs 1b to 1e notified of the pulse width Tpn from the master ECU 1a determines a sampling period Tdm suitable for the pulse width Tpn based on the information stored in the RAM 13 (see FIG. 13).
  • the information stored in the RAM 13 stores L pieces of sampling period Tdm and evaluation value information corresponding to the notified pulse width Tpn, and the slave ECUs 1b to 1e select one sampling period Tdm from these. select.
  • any selection method may be used.
  • the slave ECUs 1b to 1e can first exclude the sampling period Tdm whose evaluation value is equal to or less than the threshold from the selection target and select the sampling period Tdm having the largest evaluation value.
  • the master ECU 1a determines the sampling period Tdm with respect to the pulse width Tpn determined by itself based on the information created by itself among the information stored in the RAM 13.
  • the ECUs 1a to 1e store the pulse width Tpn determined by the master ECU 1a and the sampling period Tdm determined by the ECU 1a in a non-volatile memory for storing a set value provided in the CAN communication control unit 16, for example. Store and update communication parameters. Thereafter, communication by each of the ECUs 1a to 1e is performed using a newly set pulse width and sampling period. That is, the ECUs 1a to 1e perform dominant transmission processing with a common pulse width determined by the master ECU 1a. Each of the ECUs 1a to 1e performs reception processing in a sampling period determined by itself. The sampling periods of the ECUs 1a to 1e may be different.
  • FIG. 14 is a flowchart showing a procedure of automatic setting processing performed by the master ECU 1a.
  • the master ECU 1a transmits an automatic setting process start command to all the slave ECUs 1b to 1e in the communication system (step S61).
  • the master ECU 1a performs a test signal transmission process (step S62) and a test signal reception process (step S63).
  • the test signal transmission process in step S62 and the test signal reception process in step S63 are performed in parallel. The detailed procedure of steps S62 and S63 will be described later.
  • the master ECU 1a Based on information such as a sampling period and an evaluation value obtained by the test signal reception process, the master ECU 1a selects a sampling period suitable for the pulse width (step S64), and stores the selection result in the RAM 13 (step S65). ). Next, the master ECU 1a determines whether or not all the ECUs 1a to 1e of the communication system have finished transmitting test signals (step S66). If all the ECUs 1a to 1e have not finished transmitting the test signals (S66: NO), the master ECU 1a returns the process to step S63, and the test signal receiving process and the test signals for the slave ECUs 1b to 1e are transmitted. The sampling period is selected (in this case, the master ECU 1a does not perform the test signal transmission process).
  • the master ECU 1a gives a request for transmitting the selection result of the sampling period to one of the slave ECUs 1b to 1e (step S67).
  • the selection results transmitted from the slave ECUs 1b to 1e are received (step S68), and the received selection results are stored in the RAM 13 (step S69).
  • the master ECU 1a determines whether or not the selection results of all the ECUs 1a to 1e are stored in the RAM 13 (step S70). If the selection results of all the ECUs 1a to 1e are not stored (S70: NO), the process proceeds to step S67. And sends a transmission request to another slave ECU 1b to 1e.
  • the master ECU 1a determines one pulse width based on the evaluation value of the information stored in the RAM 13 (step S71), and determines the determined pulse width. All the slave ECUs 1b to 1e are notified (step S72). Next, the master ECU 1a determines a sampling period suitable for the pulse width determined in step S71 based on the information stored in the RAM 13 (step S73). The master ECU 1a updates the setting by storing the pulse width determined in step S71 and the sampling period determined in step S73 in, for example, a memory in the CAN communication control unit 16 (step S74), and ends the process. To do.
  • FIG. 15 is a flowchart showing a procedure of automatic setting processing performed by the slave ECUs 1b to 1e.
  • the slave ECUs 1b to 1e determine whether or not an automatic setting process start command is received from the master ECU 1a (step S81). If no start command is received (S81: NO), the slave ECU 1b-1e receives the start command. Wait until
  • the slave ECUs 1b to 1e determine whether or not the transmission order is their own (step S82). When the slave ECUs 1b to 1e are in their own transmission order (S82: YES), the slave ECUs 1b to 1e perform a test signal transmission process (step S83), and when they are not in their own transmission order (S82: NO), perform the test signal transmission process. Absent. The slave ECUs 1b to 1e perform a test signal reception process (step S84). When the slave ECUs 1b to 1e perform the test signal transmission process in step S83, the test signal transmission process and the test signal reception process in step S84 are performed in parallel.
  • the slave ECUs 1b to 1e Based on information such as the sampling period and the evaluation value obtained by the test signal reception process, the slave ECUs 1b to 1e select a sampling period suitable for the pulse width (step S85), and store the selection result in the RAM 13 (step S85). Step S86). Next, the slave ECUs 1b to 1e determine whether or not all the ECUs 1a to 1e of the communication system have finished transmitting the test signals (step S87). If all the ECUs 1a to 1e have not finished transmitting the test signals (S87: NO), the slave ECUs 1b to 1e return the process to step S82 and repeat the above process.
  • the slave ECUs 1b to 1e determine whether or not a selection result transmission request from the master ECU 1a has been received (step S88). When the transmission request for the sorting result has not been received (S88: NO), the slave ECUs 1b to 1e stand by until the transmission request is received. When the selection result transmission request is received (S88: YES), the slave ECUs 1b to 1e transmit the selection result stored in the RAM 13 to the master ECU 1a (step S89).
  • the slave ECUs 1b to 1e determine whether or not the pulse width determined and notified by the master ECU 1a has been received (step S90).
  • the slave ECUs 1b to 1e stand by until the pulse width is received.
  • the slave ECUs 1b to 1e determine a sampling period suitable for the pulse width received in step S90 based on the information stored in the RAM 13 (step S91).
  • the slave ECUs 1b to 1e update the settings by storing the pulse width received in step S90 and the sampling period determined in step S91 in, for example, a memory in the CAN communication control unit 16 (step S92), and processing Exit.
  • FIG. 16 is a flowchart showing the procedure of the test signal transmission process, which is a process performed by the ECU 1 (master ECU 1a or slave ECUs 1b to 1e) in step S62 of the flowchart shown in FIG. 14 and step S83 of the flowchart shown in FIG. .
  • variables i and j for counting the number of processing loops are used. These variables are secured in a storage area such as a register in the control unit 11 of the ECU 1 or the RAM 13.
  • the constant N is the number of types of pulse widths in the test signal
  • the constant M is the number of consecutive 2-bit strings of dominant and recessive output for one pulse width in the test signal.
  • the ECU 1 initializes the values of the variables i and j to 1 (step S101).
  • the ECU 1 sets the pulse width to the i-th pulse width Tpi (step S102), outputs a dominant with this pulse width (step S103), outputs recessive (step S104), and sets the value of the variable j to 1.
  • Are added step S105.
  • the ECU 1 determines whether or not the value of the variable j exceeds the constant M (step S106). If the value of the variable j does not exceed the constant M (S106: NO), the process returns to step S103, and the dominant and Repeat the recessive output.
  • the ECU 1 When the value of the variable j exceeds the constant M (S106: YES), the ECU 1 initializes the value of the variable j to 1 (step S107) and adds 1 to the value of the variable i (step S108). Next, the ECU 1 determines whether or not the value of the variable i exceeds a constant N (step S109). When the value of the variable i does not exceed the constant N (S109: NO), the ECU 1 outputs a delimiter (step S110), returns the process to step S102, and repeats signal output with the next pulse width. When the value of the variable i exceeds the constant N (S109: YES), the ECU 1 ends the test signal transmission process.
  • FIG. 17 is a flowchart showing the procedure of the test signal reception process, and is a process performed by the ECU 1 (master ECU 1a or slave ECUs 1b to 1e) in step S63 of the flowchart shown in FIG. 14 and step S84 of the flowchart shown in FIG. .
  • the variables i and j and the constants M and N are the same as those in the flowchart shown in FIG.
  • the ECU 1 initializes the values of the variables i and j to 1 (step S121).
  • the ECU 1 sets the sampling period to the j-th sampling period Tdj (step S122), performs dominant sampling in this sampling period (step S123), and performs recessive sampling (step S124).
  • the ECU 1 calculates an evaluation value based on the expression (2) based on the sampling results of steps S123 and S124, and stores it in the RAM 13 (step S125).
  • the ECU 1 adds 1 to the value of the variable j (step S126), and determines whether or not the value of the variable j exceeds the constant M (step S127). When the value of the variable j does not exceed the constant M (S127: NO), the ECU 1 returns the process to step S122 and repeats sampling in the next sampling period.
  • the ECU 1 When the value of the variable j exceeds the constant M (S127: YES), the ECU 1 initializes the value of the variable j to 1 (step S128) and adds 1 to the value of the variable i (step S129). Next, the ECU 1 determines whether or not the value of the variable i exceeds a constant N (step S130). When the value of the variable i does not exceed the constant N (S130: NO), after receiving the delimiter (step S131), the ECU 1 returns the process to step S122 and repeats the above process. When the value of the variable i exceeds the constant N (S130: YES), the ECU 1 ends the test signal reception process.
  • the communication system according to Embodiment 3 configured as described above has a function of automatically setting a pulse width and a sampling period necessary for performing communication processing. As a result, even when the number of ECUs 1 is increased or decreased, or when a secular change occurs, for example, when the number of ECUs 1 is increased or decreased or when maintenance is performed on the communication system, the changed communication is performed. Communication can be performed with communication parameters suitable for the characteristics. Therefore, the communication system can maintain high-quality and high-speed communication.
  • one ECU 1 transmits test signals in order, and all ECUs 1 perform processing to receive the test signals.
  • the test signal is transmitted while changing the dominant pulse width, and the test signal is received while changing the sampling period.
  • the transmission / reception results can be evaluated for a plurality of combinations of the pulse width and the sampling period, and the pulse width and the sampling period suitable for the communication characteristics of the communication system can be determined from these evaluation results.
  • the evaluation results of the slave ECUs 1b to 1e are collected in the master ECU 1a, and the master ECU 1a determines the pulse width based on all the evaluation results and notifies each slave ECU 1b to 1e. As a result, all ECUs 1 can perform subsequent communication with a common pulse width. Further, each ECU 1 determines the sampling period according to the pulse width determined by the master ECU 1a and its own evaluation result. Thereby, the sampling period suitable for each ECU 1 can be determined.
  • the evaluation value based on the expression (2) is calculated to determine the pulse width and the sampling period.
  • the present invention is not limited to this, and the evaluation value is calculated based on other calculation expressions. It may be calculated.
  • the above processing for determining the pulse width and the sampling period is performed by the control unit 11 of each ECU 1, but the present invention is not limited to this, and the CAN communication control unit 16 may perform the processing.
  • the communication system according to the fourth embodiment is slightly different from that of the communication system according to the first to third embodiments described above, with respect to the signal that each ECU 1 outputs as a dominant.
  • the transmission unit 17 of the ECU 1 according to the fourth embodiment sequentially processes each bit of transmission data composed of a plurality of bits. When the value of the processing target bit is dominant, the transmission unit 17 performs the first predetermined time Tp. After outputting the signal of the first signal level, the signal of the second signal level ( ⁇ first signal level) is output for the second predetermined time Th. In addition, when the value of the processing target bit is recessive, the transmission unit 17 sets the terminal in a high impedance state.
  • FIG. 18 is a schematic diagram for explaining signals transmitted and received by each ECU 1 in the communication system according to the fourth embodiment.
  • the vertical axis represents the potential difference V between the twist lines of the signal line 5, and the horizontal axis represents time t. It is a graph.
  • the illustrated example is a signal when transmission data changes from dominant to recessive.
  • the transmission unit 17 of the ECU 1 When transmitting the dominant data, the transmission unit 17 of the ECU 1 outputs a signal of the first signal level (V1) in the period from the start time to the first predetermined time Tp in the 1-bit transmission time Tb.
  • the signal of the second signal level (0 V) is output over the second predetermined time Th. Note that Tp + Th ⁇ Tb may be satisfied.
  • the transmission unit 17 When Tp + Th ⁇ Tb, the transmission unit 17 does not output a signal until the 1-bit transmission time Tb is reached after the second predetermined time Th has elapsed. Set to high impedance state. Further, in the case of performing recessive data transmission, the transmission unit 17 sets a terminal in a high impedance state without outputting a signal for the entire transmission time Tb of 1 bit.
  • the reception unit 18 of the ECU 1 samples the signal level of the communication line 5 at a predetermined cycle over a first predetermined time Tp from the start time in the transmission time Tb of each bit.
  • the receiving unit 18 calculates the average value of the signal level from the sampling result over the first predetermined time Tp, and determines the dominant / recessive depending on whether the calculated average value exceeds a predetermined threshold value. Do.
  • the CAN communication control unit 16 has a function of dynamically performing impedance matching of the communication line 5 when performing communication.
  • FIG. 19 is a schematic diagram for explaining impedance matching by the CAN communication control unit 16 according to the fourth embodiment, and a circuit in the CAN communication control unit 16 is schematically shown.
  • the CAN communication control unit 16 has two terminals 16a to which twist lines are connected. In the CAN communication control unit 16, for example, two internal wirings connected to the two terminals 16a are laid on a circuit board or the like.
  • the two internal wirings are respectively connected to two output terminals of the output differential amplifier of the transmission unit 17 and two input terminals of the input differential amplifier of the reception unit 18.
  • Each internal wiring is connected to one end of a resistor R via a switch SW, and the other end of the resistor R is connected to a ground potential.
  • the resistance value of each resistor R is set to 60 ⁇ , for example (this resistance value is a half value of 120 ⁇ defined as the termination resistance value of the transmission line by the CAN protocol).
  • the switching unit 19 having two switches SW connected to two internal wirings turns on the two switches SW according to a control signal output from a control circuit (not shown) in the CAN communication control unit 16. / Switch off (connect / block) simultaneously.
  • the CAN communication control unit 16 turns off the two switches SW of the switching unit 19 during the period from the start of transmission of each bit until the first predetermined time Tp elapses in the 1-bit transmission time Tb shown in FIG.
  • the resistor R is disconnected from the internal wiring.
  • the CAN communication control unit 16 turns on the two switches SW of the switching unit 19 and connects the resistor R to the internal wiring after the first predetermined time Tp ends until the 1-bit transmission time Tb ends. To do.
  • the connection / disconnection of the resistor R by the CAN communication control unit 16 is performed at the same timing regardless of whether the transmission data is dominant / recessive, and is the same timing when data is not transmitted (only reception operation). Done in In addition, the same processing is performed in the CAN communication control unit 16 of all ECUs 1 in the communication system, thereby realizing dynamic impedance matching.
  • FIG. 20 is a schematic diagram for explaining the first predetermined time Tp and the second predetermined time Th related to data transmission.
  • the two ECUs 1b and 1c included in the communication system shown in FIG. The communication line 5 (the trunk line 5a and the branch lines 5b and 5c) is extracted. Since ringing occurs when a signal output from one ECU 1 is reflected by another ECU 1, the other ECU 1 that is closest to one ECU 1 (with the shortest signal propagation distance) causes the ringing to occur. The impact is great.
  • the two ECUs 1b and 1c are closest to each other in the communication system shown in FIG. 1 (that is, the distance between the ECUs 1b and 1c is the shortest in the communication system).
  • the transmission time A per unit length is defined as 5 nsec / m in the CAN protocol, for example.
  • the second predetermined time Th is Th ⁇ 2 ⁇ L ⁇ A It is necessary to satisfy the conditions.
  • the first predetermined time Tp and the second predetermined time Th are Tp + Th ⁇ Tb It is necessary to satisfy the conditions.
  • FIGS. 21 and 22 are flowcharts showing the procedure of the transmission process by the CAN communication control unit 16 of the fourth embodiment.
  • the CAN communication control unit 16 acquires 1-bit information to be transmitted from the data to be transmitted (step S201), and determines whether the 1-bit is dominant (step S202).
  • the CAN communication control unit 16 If the transmission target bit is dominant (S202: YES), the CAN communication control unit 16 outputs a signal at the first signal level to the communication line 5 (step S203), and proceeds to step S204. In addition, when one bit to be transmitted is not dominant and is recessive (S202: NO), the CAN communication control unit 16 advances the process to step S204 without performing signal output. Next, the CAN communication control unit 16 starts a timer (step S204), and determines whether or not a first predetermined time Tp has elapsed from the start of the bit transmission process (step S205). When the first predetermined time Tp has not elapsed (S205: NO), the CAN communication control unit 16 continues the time measurement by the timer and waits until the first predetermined time Tp elapses.
  • the CAN communication control unit 16 When the first predetermined time Tp has elapsed (S205: YES), the CAN communication control unit 16 outputs a signal of the second signal level (0 V) to the communication line 5 (step S206). Thereafter, the CAN communication control unit 16 determines whether or not the second predetermined time Th has elapsed since the first predetermined time Tp has elapsed (step S207), and the second predetermined time Th has not elapsed. In the case (S207: NO), a signal of the second signal level is output and waits until the second predetermined time Th has elapsed. When the second predetermined time Th has elapsed (S207: YES), the CAN communication control unit 16 stops signal output (step S208).
  • the CAN communication control unit 16 determines whether or not the 1-bit transmission time Tb has elapsed (step S209). If the 1-bit transmission time Tb has not elapsed (S209: NO), the transmission is performed. Wait until time Tb has elapsed. When the 1-bit transmission time Tb has elapsed (S209: YES), the CAN communication control unit 16 stops the timer (step S210), and determines whether or not transmission of all bits of transmission data has been completed. Then, it is determined whether or not to end the transmission (step S211). If it is determined not to end the transmission (S211: NO), the CAN communication control unit 16 returns the process to step S201, and performs the same process for the next bit of the transmission data. If it is determined that the transmission is to be ended (S211: YES), the CAN communication control unit 16 ends the transmission process.
  • FIG. 23 and FIG. 24 are flowcharts showing a procedure of reception processing by the CAN communication control unit 16 according to the fourth embodiment.
  • the CAN communication control unit 16 sets the terminal to a high impedance state without performing signal output (step S221), and disconnects the resistor R by turning off the two switches SW of the switching unit 19 (step S222). .
  • the CAN communication control unit 16 determines whether or not the signal level of the communication line 5 exceeds a predetermined threshold value (step S223). If the signal level does not exceed the threshold value (S223: NO), the signal level is Wait until the threshold is exceeded. If the signal level exceeds the threshold (S223: YES), the CAN communication control unit 16 samples the signal level of the communication line 5 (step S224), and whether or not the first predetermined time Tp has elapsed since the start of sampling. Is determined (step S225). If the first predetermined time Tp has not elapsed (S225: NO), the CAN communication control unit 16 returns the processing to step S224, and repeats sampling of the signal level until the first predetermined time Tp has elapsed.
  • the CAN communication control unit 16 connects the resistor R by turning on the two switches SW of the switching unit 19 (step S226).
  • the CAN communication control unit 16 determines whether or not the second predetermined time Th has further elapsed from the elapse of the first predetermined time Tp (step S227), and the second predetermined time Th has not elapsed. (S227: NO), it waits until the second predetermined time Th elapses.
  • the CAN communication control unit 16 disconnects the resistor R by turning off the two switches SW of the switching unit 19 (step S228), and stops signal output.
  • the terminal is set to a high impedance state (step S229).
  • the CAN communication control unit 16 determines whether or not the 1-bit transmission time Tb has elapsed (step S230). If the 1-bit transmission time Tb has not elapsed (S230: NO), Wait until time has passed. When the transmission time Tb of 1 bit has elapsed (S230: YES), the CAN communication control unit 16 determines whether or not to end the reception by determining whether or not the reception of all the bits of the reception data has been completed. Determination is made (step S231). When it is determined that the reception is not terminated (S231: NO), the CAN communication control unit 16 returns the process to step S223 to perform the same process for the next bit of the received data, and performs the processes from step S223 to S231. Do. If it is determined that the reception is to be ended (S231: YES), the CAN communication control unit 16 ends the reception process.
  • FIG. 25 is a schematic diagram for explaining the effect of the communication system according to the fourth embodiment, and is a graph in which the vertical axis represents a potential difference between twist lines and the horizontal axis represents time.
  • the ringing signal level (amplitude) is reduced in the communication system of the present invention compared to the waveform of the conventional communication system shown in FIG.
  • the maximum ringing signal level exceeds 4V, whereas in the communication system of the present invention, the maximum ringing signal level is about 0.8V. Therefore, in the communication system of the present invention, it is possible to determine dominant / recessive by determining the signal level on the communication line 5 with a threshold value such as 0.9V or 1.0V.
  • the transmission unit 17 of the ECU 1 transmits dominant data
  • the signal at the first signal level is transmitted to the communication line 5 over the first predetermined time Tp.
  • the transmission data is recessive and the signal level of the communication line 5 is recessive and the signal of the second signal level (0V) is output for the subsequent second predetermined time Th.
  • the first predetermined time Tp The signal is not output to the communication line 5 over a long period of time, and is set in a high impedance state, and then a signal of the second signal level (0 V) is output over a second predetermined time Th.
  • the CAN communication control unit 16 of the ECU 1 is configured to be able to connect / disconnect the resistor R to the communication line 5 by switching connection / disconnection of the switch SW of the switching unit 19.
  • the resistor R is connected after the elapse of the first predetermined time Tp at the time Tb.
  • the first predetermined time Tp and the second predetermined time Th are: Tp + Th ⁇ Tb Th ⁇ 2 ⁇ L ⁇ A Set to satisfy the conditions.
  • the signal output from one ECU 1 is reflected by the other ECU 1 and the one ECU 1 does not enter the high impedance state before the reflected wave returns to the one ECU 1. It can suppress more reliably.
  • the first predetermined time Tp and the second predetermined time Th need only satisfy Tp + Th ⁇ Tb. Therefore, when Tp + Th ⁇ Tb, the transmission time Tb of 1 bit from the end of the second predetermined time Th is There is time to elapse.
  • the switch SW of the switching unit 19 is turned on during this time.
  • the present invention is not limited to this, and the switch SW may be turned off. 21 and 22 assume that Tp + Th ⁇ Tb.
  • Tp + Th Tb may be used.
  • step S212 is performed.
  • S213 may not be performed.
  • the signal level is sampled in the reception process over the first predetermined time Tp.
  • the present invention is not limited to this, and the time is shorter than the first predetermined time Tp (predetermined sampling period Th). It may be configured to perform sampling.
  • ECU communication device
  • control unit evaluation means, selection means, predetermined time determination means, predetermined sampling period determination means
  • CAN communication control unit communication means, calculation means, determination means, detection means, switching control means
  • Transmitter test transmission means, evaluation result transmission means, predetermined time information transmission means
  • Receiver Evaluation result receiving means, predetermined time information receiving means

Abstract

 Provided are a communication system, communication device, communication method and communication parameter determining method enabling higher speed communication and a reduction in the impact of ringing. If transmission data is dominant, a transmission unit (17) in an ECU (1) outputs, to a communication line (5), a signal having a specific signal level spanning a pulse width (Tp) which is shorter than the transmission time for one bit, and then stops the output of the signal to the communication line (5), creating a high impedance state, and if the transmission data is recessive, the transmission unit (17) creates a high impedance state without the output of the signal to the communication line (5). Also, a reception unit (18) in the ECU (1) samples the signal level of the communication line (5) across a sampling period (Td), calculates the average value of the sampled signal levels, and makes a dominant/recessive determination according to whether the calculated average exceeds a threshold value or not.

Description

通信システム、通信装置、通信方法及び通信パラメータ決定方法COMMUNICATION SYSTEM, COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PARAMETER DETERMINING METHOD
 本発明は、共通の通信線に接続された複数の通信装置が相互に情報の送受信を行うと共に、通信線に対する情報送信の衝突を検知することができる通信システム、通信装置、通信方法及び通信パラメータ決定方法に関する。 The present invention relates to a communication system, a communication apparatus, a communication method, and a communication parameter capable of detecting a collision of information transmission with respect to a communication line while a plurality of communication apparatuses connected to a common communication line can mutually transmit and receive information. Regarding the determination method.
 従来、車輌に搭載された複数の電子機器(通信装置)間の通信にはCAN(Controller Area Network)の通信プロトコルが広く採用されている(非特許文献1、2参照)。CANの通信プロトコルでは、共通のCANバスに複数の通信装置が接続されるため、複数の通信装置が同時的に情報送信を行って衝突が発生した場合には、各通信装置にて調停処理(アービトレーション)が行われ、優先度の高い情報送信が実行される。アービトレーションを行うために、各通信装置は、CANバスに送信信号の出力を行うと同時に、CANバスの信号レベルの検出を行い、自らが出力した送信信号に対して、検出した信号の信号レベルがレセシブ(劣性値)からドミナント(優性値)に変化した場合、優先度の高い情報送信が発生したと判断し、送信処理を停止する。CANバス上の信号はレセシブよりドミナントが優位であるため、複数の通信装置からの同時送信が発生してもドミナントを出力した電子機器は送信処理を継続して行うことができる。 Conventionally, a CAN (ControllerCAArea Network) communication protocol has been widely adopted for communication between a plurality of electronic devices (communication devices) mounted on a vehicle (see Non-Patent Documents 1 and 2). In the CAN communication protocol, since a plurality of communication devices are connected to a common CAN bus, when a plurality of communication devices transmit information simultaneously and a collision occurs, an arbitration process ( Arbitration) is performed, and information transmission with a high priority is executed. In order to perform arbitration, each communication device outputs a transmission signal to the CAN bus and simultaneously detects the signal level of the CAN bus, and the signal level of the detected signal relative to the transmission signal output by itself is detected. When it changes from recessive (inferior value) to dominant (dominant value), it judges that information transmission with high priority has occurred, and stops transmission processing. Since signals on the CAN bus are dominant over recessive signals, electronic devices that output dominant signals can continue to perform transmission processing even if simultaneous transmissions from a plurality of communication devices occur.
 一般的に、CANの通信プロトコルを採用した通信システムでは、通信線としてツイスト線が用いられ、各通信装置が差動信号による通信を行っており、ツイスト線間の電位差が閾値を超えるものをドミナントとし、電位差が閾値を超えないものをレセシブとしている。また通信装置内のデジタル処理では、ドミナントをデータ0に対応付け、レセシブをデータ1に対応付けている。図26及び図27は、従来の通信システムにおける信号波形の一例を示す模式図であり、縦軸をツイスト線間の電位差Vとし、横軸を時間tとしたグラフである。図26及び図27に示す信号波形は、CANバス上でドミナントからレセシブへ信号を変化させた場合の波形を示してある。図示のように、通信装置がCANバスへ出力する送信信号をドミナントからレセシブへ変化させた場合、CANバス上の信号レベル(電位差)が徐々に減衰しながら振動する波形が生じる。これは、多くの通信装置を接続するためにCANバスに多くの分岐部分を設ける必要があり、この分岐部分でのインピーダンス不整合などの要因により信号反射などが繰り返されることによって生じるものであり、リンギングと呼ばれる。 Generally, in a communication system adopting a CAN communication protocol, a twisted line is used as a communication line, and each communication device performs communication using a differential signal, and a case where a potential difference between twisted lines exceeds a threshold is dominant. And a recessive case where the potential difference does not exceed the threshold value. In the digital processing in the communication apparatus, the dominant is associated with data 0 and the recessive is associated with data 1. 26 and 27 are schematic diagrams showing examples of signal waveforms in a conventional communication system, in which the vertical axis represents the potential difference V between the twist lines and the horizontal axis represents time t. The signal waveforms shown in FIGS. 26 and 27 are waveforms when the signal is changed from dominant to recessive on the CAN bus. As shown in the figure, when the transmission signal output from the communication device to the CAN bus is changed from dominant to recessive, a waveform that oscillates while the signal level (potential difference) on the CAN bus gradually attenuates is generated. This is because it is necessary to provide many branch portions in the CAN bus in order to connect many communication devices, and signal reflection is repeated due to factors such as impedance mismatch in this branch portion. Called ringing.
 このようなリンギングが発生した場合、リンギングの信号レベルが有る程度減衰するまで、各通信装置はドミナント/レセシブの判定を行うことはできない。リンギングの信号レベルが減衰する時間は、CANバスを分岐させた分岐線の長さなどにより変化する。またリンギングの信号レベルは、CANバスに接続される通信装置の数などにより変化する。このため各通信装置は、通信システム中の通信装置の数及び分岐線の長さ等を考慮して、リンギングが十分に減衰すると考えられる時間を待機した後でドミナント/レセシブの判定を行う必要があり、CANプロトコルを用いる従来の通信システムはリンギングの影響によって通信の高速化が阻害されるという問題があった。 When such ringing occurs, each communication device cannot make a dominant / recessive determination until the ringing signal level is attenuated to some extent. The time during which the ringing signal level attenuates varies depending on the length of the branch line that branches the CAN bus. The ringing signal level varies depending on the number of communication devices connected to the CAN bus. For this reason, each communication device needs to make a dominant / recessive decision after waiting for a time period during which ringing is considered to be sufficiently attenuated in consideration of the number of communication devices in the communication system, the length of the branch line, and the like. In addition, the conventional communication system using the CAN protocol has a problem in that speeding up of communication is hindered by the influence of ringing.
 本発明は、斯かる事情に鑑みてなされたものであって、その目的とするところは、リンギングの影響を低減し、通信の高速化を実現可能な通信システム、通信装置、通信方法及び通信パラメータ決定方法を提供することにある。 The present invention has been made in view of such circumstances, and its object is to reduce the influence of ringing and realize a communication system, communication apparatus, communication method, and communication parameter capable of realizing high-speed communication. To provide a decision method.
 本発明に係る通信システムは、共通の通信線を介して接続された複数の通信装置を備え、各通信装置が、前記通信線を介して各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信手段をそれぞれ有する通信システムにおいて、前記通信手段は、送信する情報の優性値に対して、1ビット分の情報送信時間より短い所定時間Tpに亘って所定信号レベルのパルス信号を前記通信線へ出力した後、前記通信線への信号出力を行わず、送信する情報の劣性値に対して、前記通信線への信号出力を行わないようにしてあることを特徴とする。 The communication system according to the present invention includes a plurality of communication devices connected via a common communication line, and each communication device is represented by a binary value of a dominant value or an inferior value via the communication line. In the communication system having communication means for transmitting and receiving a plurality of consecutive bits of information, the communication means is predetermined over a predetermined time Tp shorter than the information transmission time of 1 bit with respect to the superiority value of the information to be transmitted. After outputting a pulse signal of a signal level to the communication line, the signal output to the communication line is not performed, and the signal output to the communication line is not performed for the inferior value of the information to be transmitted. It is characterized by.
 また、本発明に係る通信システムは、共通の通信線を介して接続された複数の通信装置を備え、各通信装置が、前記通信線を介して各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信手段をそれぞれ有する通信システムにおいて、前記通信手段は、送信する情報の優性値に対して、1ビット分の情報送信時間より短い第1の所定時間Tpに亘って第1信号レベルの信号を出力した後、前記情報送信時間より短い第2の所定時間Thに亘って前記第1信号レベルより低い第2信号レベルの信号を出力し、送信する情報の劣性値に対して、前記通信線への信号出力を行わないようにしてあることを特徴とする。 In addition, the communication system according to the present invention includes a plurality of communication devices connected via a common communication line, and each communication device has a binary value with each bit being a dominant value or an inferior value via the communication line. In the communication systems each having communication means for transmitting and receiving continuous plural bits of information, the communication means has a first predetermined time shorter than the information transmission time for one bit with respect to the superiority value of the information to be transmitted. Information that outputs a signal having a second signal level lower than the first signal level over a second predetermined time Th that is shorter than the information transmission time after outputting a signal having the first signal level over Tp A signal output to the communication line is not performed with respect to the inferior value.
 また、本発明に係る通信システムは、前記通信装置が、一端が固定電位に接続された抵抗器の他端を、前記通信線に対して接続/遮断する切替部と、前記1ビット分の情報送信時間において前記第1の所定時間Tpが経過した後に、前記抵抗器を接続するよう前記切替部の制御を行う切替制御手段とを備えることを特徴とする。 In the communication system according to the present invention, the communication device connects / disconnects the other end of the resistor, one end of which is connected to a fixed potential, with respect to the communication line, and the information for one bit. And switching control means for controlling the switching unit to connect the resistor after the first predetermined time Tp has elapsed in the transmission time.
 また、本発明に係る通信システムは、前記第1の所定時間Tp及び前記第2の所定時間Thは、Tp+Th≦Tb、Th≧2×L×Aの条件を満たすこと(ただし、前記Tbは前記1ビット分の情報送信時間であり、前記Lは一の通信装置から他の通信装置までに介在する前記通信線の最短距離であり、前記Aは前記通信線の単位長さ当たりにおける信号の伝達時間である。)を特徴とする。 In the communication system according to the present invention, the first predetermined time Tp and the second predetermined time Th satisfy the conditions of Tp + Th ≦ Tb and Th ≧ 2 × L × A (where Tb is 1 bit of information transmission time, L is the shortest distance of the communication line interposed from one communication apparatus to another communication apparatus, and A is signal transmission per unit length of the communication line It is time.)
 また、本発明に係る通信システムは、前記通信装置が、前記通信手段が優性値又は劣性値に係る情報を前記通信線へ出力した場合に、所定サンプリング期間Tdに亘って前記通信線における信号レベルのサンプリングを複数回行って、前記所定サンプリング期間Tdの信号レベルの平均値を算出する算出手段と、該算出手段が算出した平均値に応じて、前記通信線に送信された信号が優性値又は劣性値のいずれであるかを判定する判定手段と、劣性値の情報を送信した後に前記判定手段が優性値であると判定した場合に、他の通信装置からの情報送信を検知する検知手段とを有することを特徴とする。 In the communication system according to the present invention, when the communication device outputs information related to the superiority value or the inferiority value to the communication line, the signal level in the communication line over a predetermined sampling period Td. A plurality of times of sampling, and calculating means for calculating an average value of the signal level in the predetermined sampling period Td, and a signal transmitted to the communication line according to the average value calculated by the calculating means Determining means for determining which of the recessive values, and detecting means for detecting information transmission from other communication devices when the determining means determines that it is a dominant value after transmitting the information of the recessive value It is characterized by having.
 また、本発明に係る通信システムは、前記通信装置が、前記通信手段が優性値又は劣性値に係る情報を前記通信線へ出力した場合に、所定サンプリング期間Tdに亘って前記通信線における信号レベルのサンプリングを複数回行って、各サンプリング結果の信号レベルと閾値とを比較する比較手段と、該比較手段の比較結果に基づき、信号レベルが前記閾値を超えるサンプル数及び信号レベルが前記閾値を超えないサンプル数に応じて、前記通信線に送信された信号が優性値又は劣性値のいずれであるかを判定する判定手段と、劣性値の情報を送信した後に前記判定手段が優性値であると判定した場合に、他の通信装置からの情報送信を検知する検知手段とを有することを特徴とする。 In the communication system according to the present invention, when the communication device outputs information related to the superiority value or the inferiority value to the communication line, the signal level in the communication line over a predetermined sampling period Td. The comparison means for performing sampling of a plurality of times and comparing the signal level of each sampling result with a threshold value, and based on the comparison result of the comparison means, the number of samples whose signal level exceeds the threshold value and the signal level exceeds the threshold value A determination unit that determines whether a signal transmitted to the communication line is a dominant value or an inferior value according to the number of samples that is not present, and the determination unit is a dominant value after transmitting information on the recessive value And a detection unit that detects transmission of information from another communication device when the determination is made.
 また、本発明に係る通信システムは、前記通信装置が、所定時間Tpが異なる複数の優性値の情報を順に送信する試験送信手段と、該試験送信手段が送信した情報に対して異なる所定サンプリング期間Tdに亘るサンプリングを行って前記判定手段による判定を行い、所定時間Tp及び所定サンプリング期間Tdの組み合わせに対して受信結果を評価する評価手段と、該評価手段による評価結果に基づいて、各所定時間Tpに対して評価が高い所定サンプリング期間Tdを選別する選別手段とを有し、一の通信装置が前記試験送信手段による送信を行って、各通信装置が前記評価手段による評価及び前記選別手段による選別を行う処理を、全ての通信装置について順に行い、各通信装置の前記選別手段による選別結果に基づいて、所定時間Tp及び所定サンプリング期間Tdを決定するようにしてあることを特徴とする。 In the communication system according to the present invention, the communication device sequentially transmits information of a plurality of dominant values having different predetermined times Tp, and different predetermined sampling periods with respect to the information transmitted by the test transmission unit. Sampling over Td and making a determination by the determination means, evaluating means for evaluating the reception result for a combination of the predetermined time Tp and the predetermined sampling period Td, and each predetermined time based on the evaluation result by the evaluation means Selecting means for selecting a predetermined sampling period Td having a high evaluation with respect to Tp, wherein one communication apparatus performs transmission by the test transmission means, and each communication apparatus performs evaluation by the evaluation means and by the selection means. The process of selecting is performed for all communication devices in order, and based on the selection result by the selecting means of each communication device, a predetermined time Characterized in that you have to determine the p and a predetermined sampling period Td.
 また、本発明に係る通信システムは、前記試験送信手段が、優性値の情報及び劣性値の情報を交互に送信するようにしてあることを特徴とする。 Further, the communication system according to the present invention is characterized in that the test transmission means transmits the information of the dominant value and the information of the inferior value alternately.
 また、本発明に係る通信システムは、前記評価手段が、優性値の情報を優性値と判定した数、劣性値の情報を優性値と判定した数及びサンプリング数に応じた評価値を算出するようにしてあることを特徴とする。 In the communication system according to the present invention, the evaluation unit calculates an evaluation value corresponding to the number of the dominant value information determined as the dominant value, the number of the recessive value information determined as the dominant value, and the sampling number. It is characterized by being.
 また、本発明に係る通信システムは、前記複数の通信装置には、一の主通信装置及び複数の従通信装置を含み、前記従通信装置は、前記選別手段の選別結果に対応する前記評価手段の評価結果を、前記主通信装置へ送信する評価結果送信手段を有し、前記主通信装置は、複数の前記従通信装置が送信した評価結果を受信する評価結果受信手段と、該評価結果受信手段が受信した複数の評価結果に基づき、前記所定時間Tpを決定する所定時間決定手段と、該所定時間決定手段が決定した所定時間Tpの情報を、複数の前記従通信装置へ送信する所定時間情報送信手段とを有し、前記従通信装置は、前記所定時間情報送信手段が送信した所定時間Tpの情報を受信する所定時間情報受信手段を更に有し、該所定時間情報受信手段が受信した所定時間Tpにて、前記通信手段による以後の信号出力を行うようにしてあることを特徴とする。 Further, in the communication system according to the present invention, the plurality of communication devices include one master communication device and a plurality of slave communication devices, and the slave communication device corresponds to the evaluation unit corresponding to the sorting result of the sorting unit. Evaluation result transmission means for transmitting the evaluation result to the master communication device, wherein the master communication device receives the evaluation result transmitted by the plurality of slave communication devices, and receives the evaluation result. A predetermined time determining means for determining the predetermined time Tp based on a plurality of evaluation results received by the means; and a predetermined time for transmitting information on the predetermined time Tp determined by the predetermined time determining means to the plurality of slave communication devices. And the slave communication device further includes a predetermined time information receiving unit for receiving information of the predetermined time Tp transmitted by the predetermined time information transmitting unit, and the predetermined time information receiving unit receives the information. Place At time Tp, characterized in that are to perform the subsequent signal output by said communication means.
 また、本発明に係る通信システムは、前記主通信装置が、前記所定時間決定手段が決定した所定時間Tpに応じて、前記所定サンプリング期間Tdを決定する所定サンプリング期間決定手段を有し、該所定サンプリング期間決定手段が決定した所定サンプリング期間Tdにて、以後のサンプリングを行うようにしてあり、前記従通信装置は、前記所定時間情報受信手段が受信した所定時間Tpに応じて、前記所定サンプリング期間Tdを決定する所定サンプリング期間決定手段を有し、該所定サンプリング期間決定手段が決定した所定サンプリング期間Tdにて、以後のサンプリングを行うようにしてあることを特徴とする。 In the communication system according to the present invention, the main communication device includes predetermined sampling period determining means for determining the predetermined sampling period Td in accordance with the predetermined time Tp determined by the predetermined time determining means. Subsequent sampling is performed in the predetermined sampling period Td determined by the sampling period determining means, and the slave communication device is configured to perform the predetermined sampling period according to the predetermined time Tp received by the predetermined time information receiving means. It has a predetermined sampling period determining means for determining Td, and the subsequent sampling is performed in the predetermined sampling period Td determined by the predetermined sampling period determining means.
 また、本発明に係る通信装置は、共通の通信線を介して他の装置に接続され、前記通信線を介して各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信手段を備える通信装置において、前記通信手段は、送信する情報の優性値に対して、1ビット分の情報送信時間より短い所定時間Tpに亘って所定信号レベルのパルス信号を前記通信線へ出力した後、前記通信線への信号出力を行わず、送信する情報の劣性値に対して、前記通信線への信号出力を行わないようにしてあることを特徴とする。 Further, the communication device according to the present invention is connected to another device via a common communication line, and each bit is represented by two or more consecutive bits represented by a binary value of a dominant value or a recessive value via the communication line. In a communication apparatus including a communication unit that transmits and receives information, the communication unit outputs a pulse signal having a predetermined signal level over a predetermined time Tp shorter than an information transmission time of 1 bit with respect to a superiority value of information to be transmitted. After output to the communication line, signal output to the communication line is not performed, and signal output to the communication line is not performed for the inferior value of the information to be transmitted.
 また、本発明に係る通信装置は、共通の通信線を介して他の装置に接続され、前記通信線を介して各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信手段を備える通信装置において、前記通信手段は、送信する情報の優性値に対して、1ビット分の情報送信時間より短い第1の所定時間Tpに亘って第1信号レベルの信号を出力した後、前記情報送信時間より短い第2の所定時間Thに亘って前記第1信号レベルより低い第2信号レベルの信号を出力し、送信する情報の劣性値に対して、前記通信線への信号出力を行わないようにしてあることを特徴とする。 Further, the communication device according to the present invention is connected to another device via a common communication line, and each bit is represented by two or more consecutive bits represented by a binary value of a dominant value or a recessive value via the communication line. In a communication apparatus comprising a communication means for transmitting and receiving information, the communication means has a first signal level over a first predetermined time Tp shorter than an information transmission time for one bit with respect to a superiority value of information to be transmitted. After outputting a signal, a signal having a second signal level lower than the first signal level is output for a second predetermined time Th shorter than the information transmission time, and the communication with respect to the inferior value of the information to be transmitted The signal output to the line is not performed.
 また、本発明に係る通信装置は、前記通信手段が優性値又は劣性値に係る情報を前記通信線へ出力した場合に、所定サンプリング期間Tdに亘って前記通信線における信号レベルのサンプリングを複数回行って、前記所定サンプリング期間Tdの信号レベルの平均値を算出する算出手段と、該算出手段が算出した平均値に応じて、前記通信線に送信された信号が優性値又は劣性値のいずれであるかを判定する判定手段と、劣性値の情報を送信した後に前記判定手段が優性値であると判定した場合に、他の通信装置からの情報送信を検知する検知手段とを備えることを特徴とする。 Further, the communication device according to the present invention performs sampling of the signal level in the communication line a plurality of times over a predetermined sampling period Td when the communication means outputs information relating to the dominant value or the inferior value to the communication line. And calculating means for calculating an average value of the signal level during the predetermined sampling period Td, and depending on the average value calculated by the calculating means, the signal transmitted to the communication line is either a dominant value or a recessive value. A determination unit that determines whether or not there is a detection unit that detects transmission of information from another communication device when the determination unit determines that the determination is a dominant value after transmitting the information of the recessive value. And
 また、本発明に係る通信装置は、前記通信手段が優性値又は劣性値に係る情報を前記通信線へ出力した場合に、所定サンプリング期間Tdに亘って前記通信線における信号レベルのサンプリングを複数回行って、各サンプリング結果の信号レベルと閾値とを比較する比較手段と、該比較手段の比較結果に基づき、信号レベルが前記閾値を超えるサンプル数及び信号レベルが前記閾値を超えないサンプル数に応じて、前記通信線に送信された信号が優性値又は劣性値のいずれであるかを判定する判定手段と、劣性値の情報を送信した後に前記判定手段が優性値であると判定した場合に、他の通信装置からの情報送信を検知する検知手段とを備えることを特徴とする。 Further, the communication device according to the present invention performs sampling of the signal level in the communication line a plurality of times over a predetermined sampling period Td when the communication means outputs information relating to the dominant value or the inferior value to the communication line. And comparing means for comparing the signal level of each sampling result with a threshold, and based on the comparison result of the comparing means, the number of samples whose signal level exceeds the threshold and the number of samples whose signal level does not exceed the threshold And determining means for determining whether the signal transmitted to the communication line is a dominant value or an inferior value, and determining that the determining means is a dominant value after transmitting the information of the inferior value, And detecting means for detecting information transmission from another communication device.
 また、本発明に係る通信装置は、所定時間Tpが異なる複数の優性値の情報を順に送信する試験送信手段と、該試験送信手段が送信した情報に対して異なる所定サンプリング期間Tdに亘るサンプリングを行って前記判定手段による判定を行い、所定時間Tp及び所定サンプリング期間Tdの組み合わせに対する受信結果を評価する評価手段と、該評価手段による評価結果に基づいて、各所定時間Tpに対して評価が高い所定サンプリング期間Tdを選別する選別手段とを備えることを特徴とする。 The communication apparatus according to the present invention also includes a test transmission unit that sequentially transmits information of a plurality of dominant values having different predetermined times Tp, and sampling over different predetermined sampling periods Td with respect to the information transmitted by the test transmission unit. Evaluation is performed by the determination means, and evaluation means for evaluating the reception result for the combination of the predetermined time Tp and the predetermined sampling period Td, and the evaluation is high for each predetermined time Tp based on the evaluation result by the evaluation means And a selecting means for selecting a predetermined sampling period Td.
 また、本発明に係る通信方法は、共通の通信線を介して、各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信方法において、送信する情報の優性値に対して、1ビット分の情報送信時間より短い所定時間Tpに亘って所定信号レベルのパルス信号を前記通信線へ出力した後、前記通信線への信号出力を行わず、送信する情報の劣性値に対して、前記通信線への信号出力を行わないことを特徴とする。 Further, the communication method according to the present invention is a communication method for transmitting and receiving information of a plurality of consecutive bits each represented by a binary value of a dominant value or a recessive value via a common communication line. Information to be transmitted without outputting a signal to the communication line after outputting a pulse signal of a predetermined signal level to the communication line over a predetermined time Tp shorter than the information transmission time of 1 bit with respect to the dominant value. The signal output to the communication line is not performed with respect to the inferior value.
 また、本発明に係る通信方法は、共通の通信線を介して、各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信方法において、送信する情報の優性値に対して、1ビット分の情報送信時間より短い第1の所定時間Tpに亘って第1信号レベルの信号を出力した後、前記情報送信時間より短い第2の所定時間Thに亘って前記第1信号レベルより低い第2信号レベルの信号を出力し、送信する情報の劣性値に対して、前記通信線への信号出力を行わないことを特徴とする。 Further, the communication method according to the present invention is a communication method for transmitting and receiving information of a plurality of consecutive bits each represented by a binary value of a dominant value or a recessive value via a common communication line. After outputting the signal of the first signal level over the first predetermined time Tp shorter than the information transmission time for 1 bit with respect to the dominant value, over the second predetermined time Th shorter than the information transmission time. A signal having a second signal level lower than the first signal level is output, and signal output to the communication line is not performed for the inferior value of information to be transmitted.
 また、本発明に係る通信パラメータ決定方法は、上述の通信システムにて、前記所定時間Tp及び前記所定サンプリング期間Tdを決定する通信パラメータ決定方法であって、一の通信装置にて所定時間Tpが異なる複数の優性値の情報を順に送信し、前記一の通信装置が送信した情報に対して異なる所定サンプリング期間Tdに亘るサンプリングを行って前記判定手段による判定を行い、所定時間Tp及び所定サンプリング期間Tdの組み合わせに対する受信結果を評価し、評価結果に基づいて、各所定時間Tpに対して評価が高い所定サンプリング期間Tdを選別し、一の通信装置の送信を行って、各通信装置が評価及び選別を行う処理を、全ての通信装置について順に行い、各通信装置の選別結果に基づいて、所定時間Tp及び所定サンプリング期間Tdを決定することを特徴とする。 The communication parameter determination method according to the present invention is a communication parameter determination method for determining the predetermined time Tp and the predetermined sampling period Td in the communication system described above, wherein the predetermined time Tp is determined by one communication apparatus. Information of a plurality of different dominant values is transmitted in order, the information transmitted by the one communication device is sampled over a different predetermined sampling period Td and determined by the determination means, and the predetermined time Tp and the predetermined sampling period The reception result for the combination of Td is evaluated, and based on the evaluation result, a predetermined sampling period Td that is highly evaluated for each predetermined time Tp is selected, and transmission of one communication device is performed. The process of selecting is performed in order for all communication devices, and based on the selection result of each communication device, the predetermined time Tp and the predetermined And determining a sampling period Td.
 本発明においては、送信する情報がドミナント(優性値)の場合、通信装置は、1ビット分の情報送信時間に対して、この時間よりも短い所定時間Tpに亘るハイレベル(所定信号レベル)の信号を通信線へ出力し、その後は通信線への信号出力を停止する(ハイインピーダンス状態となる)。また送信する情報がレセシブ(劣性値)の場合、通信装置は、通信線への信号出力を行わない(ハイインピーダンス状態となる)。
 これにより、ドミナントの送信とレセシブの送信とが衝突した場合、通信線上には所定時間Tpに亘ってドミナントに対応する信号が伝送されるため、レセシブを送信した通信装置は通信線上の信号を検出することによって、他の通信装置が送信した優性値の信号を検知することができる。
 また通信装置がドミナントを送信する場合、所定時間Tpに亘る信号の出力後に、通信線にはリンギングが発生するが、信号の出力時間を1ビット分の情報送信時間に対して短く設定することにより、信号出力後から次のビットの情報送信が開始されるまでの間に、リンギングを減衰させることができる。また通信装置がレセシブを送信してもリンギングは発生しない。
 これにより、通信装置がドミナントを送信した次のビットにおけるリンギングの影響を低減できるため、各ビットにおいてドミナント/レセシブの判定を早いタイミングで行うことが可能となる。よって、通信の高速化が実現できる。
In the present invention, when the information to be transmitted is dominant (dominant value), the communication apparatus has a high level (predetermined signal level) over a predetermined time Tp shorter than this time with respect to the information transmission time of 1 bit. The signal is output to the communication line, and then the signal output to the communication line is stopped (becomes a high impedance state). When the information to be transmitted is recessive (inferior value), the communication device does not output a signal to the communication line (becomes a high impedance state).
As a result, when a dominant transmission and a recessive transmission collide, a signal corresponding to the dominant is transmitted over a predetermined time Tp on the communication line, so the communication device that has transmitted the recession detects the signal on the communication line. By doing so, the signal of the dominant value transmitted by another communication apparatus can be detected.
When the communication device transmits a dominant signal, ringing occurs in the communication line after the signal is output for a predetermined time Tp. By setting the signal output time to be shorter than the information transmission time for one bit, The ringing can be attenuated after the signal output until the transmission of the next bit information starts. Further, no ringing occurs even when the communication device transmits a recessive signal.
As a result, the influence of ringing on the next bit to which the communication apparatus has transmitted a dominant can be reduced, so that dominant / recessive determination can be performed at an early timing for each bit. Therefore, high-speed communication can be realized.
 従来のCANにおいて図26及び図27に示したようなリンギングは、通信装置の送信をドミナントからレセシブに変化させた場合に発生する。通信装置は、ドミナントの送信として通信線にハイレベルの信号(所定の電位差の信号)を出力し、その後、レセシブになりハイインピーダンス状態となる。一の通信装置によるドミナントからレセシブへの信号変化は、レセシブ(ハイインピーダンス状態)の他の通信装置にて反射され、この反射がレセシブへ移行した一の通信装置にて更に反射されることによって多重反射が発生し、リンギングとなる。
 そこで本発明においては、送信する情報がドミナント(優性値)の場合、通信装置は、1ビット分の情報送信時間に対して、この時間よりも短い第1の所定時間Tpに亘る第1信号レベルの信号を出力した後、第2の所定時間Thに亘る第2信号レベル(<第1信号レベル)の信号を通信線へ出力する。即ち通信装置は、ドミナントに対して第1信号レベルから第2信号レベルへ変化するパルス状の信号を出力する。また送信する情報がレセシブ(劣性値)の場合、通信装置は、通信線への信号出力を行わない(ハイインピーダンス状態となる)。
 これにより、ドミナントの送信とレセシブの送信とが同時的に存在した場合、通信線上には第1信号レベルから第2信号レベルへ変化するパルス状の信号が観測されるため、レセシブを送信した通信装置は通信線上の信号を検出することによって、ドミナントを送信した通信装置の存在を検知することができる。なおレセシブを送信した通信装置は、第1信号レベルの時間が経過した後、第2信号レベルの区間にてインピーダンスマッチングを行うことにより、反射信号の発生を抑制することができる。
 また通信装置が送信する情報をドミナントからレセシブへ変化させた場合、第1信号レベルから第2信号レベルへ信号レベルを低下させた後にハイインピーダンス状態へ移行する。このため通信線にて反射される信号の振幅を低減することができ、更に第2信号レベルを略0Vとすることで、反射信号の振幅を略0Vとすることができるため、リンギングの発生を抑制できる。
 これにより、通信装置がドミナントを送信した次のビットにおけるリンギングの影響を低減できるため、各ビットにおいてドミナント/レセシブの判定を早いタイミングで行うことが可能となる。よって、通信の高速化が実現できる。
In conventional CAN, ringing as shown in FIGS. 26 and 27 occurs when transmission of the communication apparatus is changed from dominant to recessive. The communication device outputs a high level signal (a signal having a predetermined potential difference) to the communication line as a dominant transmission, and then becomes recessive and enters a high impedance state. The signal change from dominant to recessive by one communication device is reflected by another communication device in recessive (high impedance state), and this reflection is further reflected by the one communication device that has transitioned to recessive. Reflection occurs and ringing occurs.
Therefore, in the present invention, when the information to be transmitted is a dominant (dominant value), the communication apparatus performs the first signal level over a first predetermined time Tp shorter than this time with respect to the information transmission time of 1 bit. After the signal is output, a signal of the second signal level (<first signal level) over the second predetermined time Th is output to the communication line. That is, the communication apparatus outputs a pulse-like signal that changes from the first signal level to the second signal level in response to the dominant. When the information to be transmitted is recessive (inferior value), the communication device does not output a signal to the communication line (becomes a high impedance state).
As a result, when dominant transmission and recessive transmission exist simultaneously, a pulse-like signal changing from the first signal level to the second signal level is observed on the communication line. By detecting a signal on the communication line, the device can detect the presence of the communication device that has transmitted the dominant. In addition, the communication apparatus which transmitted recessive can suppress generation | occurrence | production of a reflected signal by performing impedance matching in the area of a 2nd signal level after the time of a 1st signal level passes.
When the information transmitted by the communication apparatus is changed from dominant to recessive, the signal level is lowered from the first signal level to the second signal level, and then the state is shifted to the high impedance state. For this reason, the amplitude of the signal reflected by the communication line can be reduced, and further, by setting the second signal level to approximately 0V, the amplitude of the reflected signal can be approximately 0V. Can be suppressed.
As a result, the influence of ringing on the next bit to which the communication apparatus has transmitted a dominant can be reduced, so that dominant / recessive determination can be performed at an early timing for each bit. Therefore, high-speed communication can be realized.
 複数の通信装置が共通の通信線を介して通信を行うシステムでは、主の通信線(幹線)を分岐させて支線を設け、この幹線又は支線の端部に通信装置がそれぞれ接続される。本発明においては、各通信装置が接続される通信線に対して、接地電位などの固定電位に接続された抵抗器を接続/遮断するスイッチなどの切替部を設ける。また各通信装置は、1ビット送信時間における第1の所定時間TPの経過後に抵抗器を接続するよう切替部の制御を行う。これにより通信システム中の各通信装置は、1ビット送信時間における第1の所定時間Tpの経過後に通信線に対する抵抗器の接続を行い、この抵抗器によるインピーダンスマッチングを行うことができる。これにより、リンギング発生の要因であるインピーダンスの不整合を解消でき、リンギングの発生を抑制できる。 In a system in which a plurality of communication devices communicate via a common communication line, a main communication line (main line) is branched to provide a branch line, and the communication apparatus is connected to the end of the main line or branch line. In the present invention, a switching unit such as a switch for connecting / cutting off a resistor connected to a fixed potential such as a ground potential is provided for a communication line to which each communication device is connected. Each communication apparatus controls the switching unit to connect the resistor after the first predetermined time TP in the 1-bit transmission time has elapsed. Thereby, each communication device in the communication system can connect the resistor to the communication line after the elapse of the first predetermined time Tp in the 1-bit transmission time, and perform impedance matching by the resistor. As a result, impedance mismatching, which is a cause of ringing, can be eliminated, and ringing can be suppressed.
 リンギングは一の通信装置が出力した信号が他の通信装置にて反射されることにより生じるため、一の通信装置に対して最も隣接した(信号が伝搬する通信線の距離が最も短い)他の通信装置が、リンギングの発生に与える影響が大きい。
 そこで本発明においては、通信システムに含まれる2つの通信装置間に介在する通信線の最短距離をLとし、通信線の単位長さ当たりの伝達時間をAとした場合に、第2の所定時間Thを
  Th≧2×L×A
の条件を満たすように設定する。なお2×Lは2つの通信装置間の往復距離であり、2×L×Aは一の通信装置から出力された信号が他の通信装置にて反射されて一の通信装置へ戻るまでの時間である。この時間以上に第2の所定時間Thを設定することによって、反射波が一の通信装置へ戻る前に、抵抗器によるインピーダンスマッチングを行うことにより、一の通信装置がハイインピーダンス状態へ移行することがなく、リンギングの発生を確実に抑制できる。
 また第1の所定時間Tpは、1ビット分の情報送信時間をTbとした場合、
  Tp+Th≦Tb
の条件を満たすように設定する必要がある。
Since ringing occurs when a signal output from one communication device is reflected by another communication device, the ringing is the closest to one communication device (the distance of the communication line through which the signal propagates is the shortest). The communication device has a great influence on the occurrence of ringing.
Therefore, in the present invention, when the shortest distance of the communication line interposed between two communication devices included in the communication system is L and the transmission time per unit length of the communication line is A, the second predetermined time. Th is Th ≧ 2 × L × A
Set to satisfy the conditions. Note that 2 × L is a round trip distance between two communication devices, and 2 × L × A is a time until a signal output from one communication device is reflected by another communication device and returned to the one communication device. It is. By setting the second predetermined time Th to be equal to or longer than this time, the impedance matching by the resistor is performed before the reflected wave returns to the one communication device, so that the one communication device shifts to the high impedance state. And ringing can be reliably suppressed.
Further, the first predetermined time Tp is, when the information transmission time for 1 bit is Tb,
Tp + Th ≦ Tb
It is necessary to set so as to satisfy the conditions.
 また、本発明においては、通信装置は上記のような信号を通信線へ出力する場合、所定サンプリング期間Tdに亘って通信線の信号レベルのサンプリングを複数回行い、複数回のサンプリング結果から信号レベルの平均値を算出する。例えば通信装置は、ドミナントとして出力する信号の出力時間(所定時間Tp)と同程度の時間に亘ってサンプリングを行う。これにより通信装置は、通信線上の信号がドミナントの場合、信号レベルの平均値として、ドミナントとして出力する信号の信号レベルと同程度の値を算出することができる。また通信線上の信号がレセシブの場合、通信装置は、信号レベルの平均値として、0V近傍の値を算出することができる。通信線上にリンギングが発生している場合であっても、リンギングは正負の振幅を繰り返すため、信号レベルの平均値を算出することによってリンギングの影響を排除できる。
 通信装置は、例えば算出した信号レベルの平均値が閾値を超えるか否かに応じて、通信線上の信号がドミナント/レセシブのいずれのものであるかを判定し、自らがレセシブの情報を送信した後に通信線上の信号がドミナントと判定した場合、情報送信が衝突したことを検知する。これにより通信装置は、リンギングの影響を低減して、他の通信装置が送信した信号の検知を行うことができる。
Further, in the present invention, when the communication apparatus outputs the above signal to the communication line, the communication line performs sampling of the signal level of the communication line a plurality of times over a predetermined sampling period Td, and the signal level is obtained from the sampling results of the plurality of times. The average value of is calculated. For example, the communication apparatus performs sampling over a time that is about the same as the output time (predetermined time Tp) of the signal output as the dominant. Accordingly, when the signal on the communication line is dominant, the communication apparatus can calculate a value approximately equal to the signal level of the signal output as the dominant as the average value of the signal level. When the signal on the communication line is recessive, the communication device can calculate a value in the vicinity of 0 V as the average value of the signal level. Even when ringing occurs on the communication line, the ringing repeats positive and negative amplitudes, so that the influence of the ringing can be eliminated by calculating the average value of the signal level.
The communication device determines whether the signal on the communication line is dominant / recessive, for example, depending on whether the average value of the calculated signal level exceeds a threshold value, and transmits communication information by itself. When the signal on the communication line is later determined to be dominant, it is detected that the information transmission has collided. As a result, the communication device can reduce the influence of ringing and detect a signal transmitted by another communication device.
 また、本発明においては、通信装置は上記のような信号を通信線へ出力する場合、所定サンプリング期間Tdに亘って通信線の信号レベルのサンプリングを複数回行い、各サンプリング結果の信号レベルと閾値との比較を行う。この比較の結果から、信号レベルが閾値を超えたサンプル数と、信号レベルが閾値を超えないサンプル数とを比較し、いわゆる多数決判定によって通信線上の信号がドミナント/レセシブのいずれであるかを判定する。
 例えば通信装置は、ドミナントとして出力する信号の出力時間(所定パルス幅)と同程度の時間に亘ってサンプリングを行う。サンプリング結果と閾値との比較は、簡単なCMOS(Complementary Metal Oxide Semiconductor)回路にサンプリング結果の信号レベルを入力し、出力される2値信号を取得することによって容易に行うことができる。
 通信装置は、自らがレセシブの情報を送信した後に通信線上の信号がドミナントと判定した場合、他の通信装置がドミナントの信号を送信したことを検知できる。
In the present invention, when the communication apparatus outputs the above signal to the communication line, the signal level of the communication line is sampled a plurality of times over a predetermined sampling period Td, and the signal level and threshold value of each sampling result are obtained. Compare with. From the result of this comparison, the number of samples whose signal level exceeds the threshold is compared with the number of samples whose signal level does not exceed the threshold, and it is determined whether the signal on the communication line is dominant or recessive by so-called majority decision. To do.
For example, the communication apparatus performs sampling over a time that is about the same as the output time (predetermined pulse width) of a signal output as a dominant. The comparison between the sampling result and the threshold value can be easily performed by inputting the signal level of the sampling result to a simple CMOS (Complementary Metal Oxide Semiconductor) circuit and acquiring the output binary signal.
When the communication device determines that the signal on the communication line is dominant after transmitting the recessive information, the communication device can detect that another communication device has transmitted the dominant signal.
 上述のような通信を行うためには、各通信装置にて通信処理を行うために必要な所定時間Tp及び所定サンプリング期間Tdの通信パラメータを適切に設定する必要がある。通信特性は通信線の長さ及び通信装置の数等の影響を受けるため、これら通信パラメータは通信システム毎に適切な設定を行わなければならない。通信システムにて通信特性を測定し、これら通信パラメータを予め決定することが可能であるが、通信システムにおける通信装置の増減又は経年変化等の要因によって通信特性が変化する可能性がある。
 そこで本発明においては、例えば通信システムの出荷時、メンテナンス時又は通信装置の数を増減したとき等に、通信システムの各通信装置が試験的な情報の送受信を行い、所定時間Tp及び所定サンプリング期間Thの通信パラメータを決定する。
In order to perform communication as described above, it is necessary to appropriately set communication parameters for a predetermined time Tp and a predetermined sampling period Td necessary for performing communication processing in each communication device. Since the communication characteristics are affected by the length of the communication line and the number of communication devices, these communication parameters must be set appropriately for each communication system. Although it is possible to measure communication characteristics in a communication system and determine these communication parameters in advance, there is a possibility that the communication characteristics change due to factors such as increase or decrease of communication devices or aging in the communication system.
Therefore, in the present invention, for example, when the communication system is shipped, maintained, or when the number of communication devices is increased or decreased, each communication device of the communication system transmits and receives experimental information, and the predetermined time Tp and the predetermined sampling period. Th communication parameters are determined.
 一の通信装置は、所定時間Tpが異なる複数の優性値の情報を順に送信する。各通信装置は、一の通信装置が順に送信した情報を異なる所定サンプリング期間Tdで複数回サンプリングして情報の受信処理を行う。例えば一の通信装置は、所定時間Tp1、Tp1、Tp1、Tp2、Tp2、Tp2、Tp3、Tp3、Tp3のように所定時間Tpを変化させて優性値の情報を順に送信する。これに対して例えば各通信装置は、所定サンプリング期間Td1、Td2、Td3、Td1、Td2、Td3、Td1、Td2、Td3のように所定サンプリング期間Tdを変化させて順にサンプリングを行う。この例の場合、3通りの所定時間Tp及び3通りの所定サンプリング期間Tdにより、所定時間Tp及び所定サンプリング期間Tdの組み合わせは9通りとなる。各通信装置は、各組み合わせの受信結果を評価し、評価結果に基づいて各所定時間Tpに対して評価の高い所定サンプリング期間Tdを選別する。上記の例では、各所定時間Tp1、Tp2、Tp3に対して評価が高い所定サンプリング期間Td1、Td2、Td3が1つ選択され、選別結果として3通りの所定時間Tp及び所定サンプリング期間Tdの組み合わせが得られる。
 一の通信装置として試験的な情報送信を行う通信装置を順に変更して、全ての通信装置について同様の処理を行い、これらの処理結果から最終的に所定時間Tp及び所定サンプリング期間Tdを決定する。
 これにより、通信システムの通信装置間で試験的な情報の送受信を通信パラメータの種々の条件で行うことができ、何れの条件が適しているかを各通信装置が判断することができる。
One communication apparatus sequentially transmits information of a plurality of dominant values having different predetermined times Tp. Each communication apparatus performs information reception processing by sampling information transmitted in sequence by one communication apparatus a plurality of times at different predetermined sampling periods Td. For example, one communication apparatus sequentially transmits information of dominance values by changing the predetermined time Tp such as predetermined times Tp1, Tp1, Tp1, Tp2, Tp2, Tp2, Tp3, Tp3, and Tp3. On the other hand, for example, each communication apparatus performs sampling in order by changing the predetermined sampling period Td like the predetermined sampling periods Td1, Td2, Td3, Td1, Td2, Td3, Td1, Td2, and Td3. In this example, there are nine combinations of the predetermined time Tp and the predetermined sampling period Td by the three predetermined times Tp and the three predetermined sampling periods Td. Each communication apparatus evaluates the reception result of each combination, and selects a predetermined sampling period Td having a high evaluation for each predetermined time Tp based on the evaluation result. In the above example, one predetermined sampling period Td1, Td2, Td3 that is highly evaluated for each predetermined time Tp1, Tp2, Tp3 is selected, and three combinations of the predetermined time Tp and the predetermined sampling period Td are selected as the sorting results. can get.
The communication devices that perform trial information transmission as one communication device are sequentially changed, the same processing is performed for all the communication devices, and finally, the predetermined time Tp and the predetermined sampling period Td are determined from these processing results. .
Accordingly, transmission / reception of trial information between communication devices of the communication system can be performed under various conditions of communication parameters, and each communication device can determine which condition is suitable.
 また、本発明においては、上記のような試験的な情報の送受信を行う際に、一の通信装置は優性値の情報と劣性値の情報とを交互に送信する。これによりリンギングの発生しやすい悪条件で試験的な情報の送受信が行われ、より適切な通信パラメータを決定することができる。 Also, in the present invention, when transmitting / receiving experimental information as described above, one communication apparatus alternately transmits dominant value information and inferior value information. Thereby, trial information is transmitted and received under an unfavorable condition in which ringing is likely to occur, and a more appropriate communication parameter can be determined.
 また、本発明においては、所定時間Tp及び所定サンプリング期間Tdの一の組み合わせに対して、優性値の情報を優性値と判定した数(D0)、劣性値の情報を優性値と判定した数(R0)、及び、サンプリング期間中に行ったサンプリング数(Pd)に応じた評価値(例えば(D0-R0)/Pd)を算出する。各通信装置は、算出した評価値に応じて所定時間Tpに対して適した所定サンプリング期間Tdを選別することができる。 In the present invention, for a combination of the predetermined time Tp and the predetermined sampling period Td, the number (D0) in which the information on the dominant value is determined as the dominant value (D0) and the number in which the information on the inferior value is determined as the dominant value ( R0) and an evaluation value (for example, (D0−R0) / Pd) corresponding to the number of samplings (Pd) performed during the sampling period are calculated. Each communication device can select a predetermined sampling period Td suitable for the predetermined time Tp according to the calculated evaluation value.
 また、本発明においては、通信システムに一の主通信装置と複数の従通信装置とを含む。従通信装置は、上記のような評価及び選別を行い、選別結果に対応する評価結果を主通信装置へ送信する。主通信装置は、各従通信装置からの評価結果を受信し、この評価結果に基づいて一の所定時間Tpを以後の通信にて用いる所定時間Tpとして決定する。主通信装置は、決定した所定時間Tpを各従通信装置へ送信する。各従通信装置は、主通信装置から受信した所定時間Tpにて、以後の情報送信の際の信号出力を行う。
 これにより、各従通信装置での評価結果を主通信装置に集約して所定時間Tpを決定することができ、全ての通信装置が共通の所定時間Tpで以後の通信を行うことができる。
In the present invention, the communication system includes one master communication device and a plurality of slave communication devices. The slave communication device performs the evaluation and selection as described above, and transmits an evaluation result corresponding to the selection result to the main communication device. The main communication device receives the evaluation result from each slave communication device, and determines one predetermined time Tp as the predetermined time Tp used in the subsequent communication based on the evaluation result. The master communication device transmits the determined predetermined time Tp to each slave communication device. Each slave communication device outputs a signal for subsequent information transmission at a predetermined time Tp received from the master communication device.
As a result, the evaluation results of the respective slave communication devices can be aggregated in the main communication device to determine the predetermined time Tp, and all communication devices can perform subsequent communication at the common predetermined time Tp.
 また、本発明においては、各従通信装置は主通信装置から受信した所定時間Tpに応じて、所定サンプリング期間Tdを決定する。各従通信装置は、所定時間Tpに対して評価が高い所定サンプリング期間Tdを既に選別しているため、選別結果から所定時間Tpに対応する所定サンプリング期間Tdを選択することによって、所定サンプリング期間Tdを決定することができる。なお所定サンプリング期間Tdは、通信装置毎に異なってよい。 In the present invention, each slave communication device determines a predetermined sampling period Td according to the predetermined time Tp received from the main communication device. Since each slave communication device has already selected a predetermined sampling period Td that is highly evaluated with respect to the predetermined time Tp, by selecting the predetermined sampling period Td corresponding to the predetermined time Tp from the selection result, the predetermined sampling period Td Can be determined. The predetermined sampling period Td may be different for each communication device.
 本発明による場合は、1ビット分の情報送信時間より短い信号をドミナントとして出力する構成とすることにより、送信する情報の次ビットにリンギングが与える影響を低減することができ、各ビットにおけるドミナント/レセシブの判定を早いタイミングで行うことが可能となるため、CANプロトコルのようなアービトレーションを行う必要がある通信を高速化することができる。 According to the present invention, by adopting a configuration in which a signal shorter than the information transmission time for one bit is output as a dominant, the influence of ringing on the next bit of information to be transmitted can be reduced. Since recessive determination can be performed at an early timing, communication that requires arbitration such as the CAN protocol can be speeded up.
 また本発明による場合は、通信装置がドミナントの情報送信に対して、第1の所定時間Tpに亘る第1信号レベルの信号出力の後、第2の所定時間Thに亘る第2信号レベルの信号出力を行う構成とすることにより、送信データの1ビット以内にリンギングの発生を抑制することができるため、各ビットにおけるドミナント/レセシブの判定を早いタイミングで行うことが可能となり、CANプロトコルのようなアービトレーションを行う通信を高速化することができる。 According to the present invention, the communication apparatus outputs a signal having the second signal level for the second predetermined time Th after the first signal level signal output for the first predetermined time Tp for the dominant information transmission. Since the output configuration can suppress the occurrence of ringing within one bit of transmission data, it is possible to perform dominant / recessive determination at each bit at an early timing, as in the CAN protocol. Communication that performs arbitration can be accelerated.
 また本発明による場合は、各通信装置が試験的な情報の送受信を行って所定時間Tp及び所定サンプリング期間Tdの通信パラメータを決定する構成とすることで、例えば通信装置の数が増減した場合又は経年変化等によって通信特性が変化した場合であっても、変化した通信特性に適した通信パラメータを自動的に決定することができる。 Further, according to the present invention, when each communication device transmits and receives experimental information and determines the communication parameters for the predetermined time Tp and the predetermined sampling period Td, for example, when the number of communication devices increases or decreases, or Even when the communication characteristics change due to secular change or the like, communication parameters suitable for the changed communication characteristics can be automatically determined.
通信システムの一構成例を示す模式図である。It is a schematic diagram which shows one structural example of a communication system. 通信装置の構成を示すブロック図である。It is a block diagram which shows the structure of a communication apparatus. 本発明に係る通信システムにおいて各ECUが送受信する信号を説明するための模式図である。It is a schematic diagram for demonstrating the signal which each ECU transmits / receives in the communication system which concerns on this invention. シミュレーションにより評価を行った通信システムの構成を説明するための模式図である。It is a schematic diagram for demonstrating the structure of the communication system evaluated by simulation. シミュレーションにより評価を行った通信システムの構成を説明するための模式図である。It is a schematic diagram for demonstrating the structure of the communication system evaluated by simulation. シミュレーション結果を示すグラフである。It is a graph which shows a simulation result. 送信部による送信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the transmission process by a transmission part. 受信部による受信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reception process by a receiving part. 実施の形態2のシミュレーション結果を示す表である。10 is a table showing simulation results of the second embodiment. 実施の形態2の受信部による受信処理の手順を示すフローチャートである。10 is a flowchart illustrating a procedure of reception processing by a reception unit according to the second embodiment. 実施の形態2の受信部による受信処理の手順を示すフローチャートである。10 is a flowchart illustrating a procedure of reception processing by a reception unit according to the second embodiment. 自動設定処理にて出力される試験信号を説明するための模式図である。It is a schematic diagram for demonstrating the test signal output by an automatic setting process. 自動設定処理にて行うサンプリングを説明するための模式図である。It is a schematic diagram for demonstrating the sampling performed in an automatic setting process. RAMに記憶される選別結果の一例を示す模式図である。It is a schematic diagram which shows an example of the selection result memorize | stored in RAM. マスターECUが行う自動設定処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the automatic setting process which master ECU performs. スレーブECUが行う自動設定処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the automatic setting process which a slave ECU performs. 試験信号送信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a test signal transmission process. 試験信号受信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a test signal reception process. 実施の形態4に係る通信システムにおいて各ECUが送受信する信号を説明するための模式図である。FIG. 10 is a schematic diagram for explaining signals transmitted and received by each ECU in a communication system according to a fourth embodiment. 実施の形態4のCAN通信制御部によるインピーダンスマッチングを説明するための模式図である。FIG. 10 is a schematic diagram for explaining impedance matching by a CAN communication control unit according to a fourth embodiment. データ送信に係る第1の所定時間及び第2の所定時間について説明するための模式図である。It is a schematic diagram for demonstrating the 1st predetermined time and 2nd predetermined time which concern on data transmission. 実施の形態4のCAN通信制御部による送信処理の手順を示すフローチャートである。10 is a flowchart illustrating a procedure of transmission processing by a CAN communication control unit according to the fourth embodiment. 実施の形態4のCAN通信制御部による送信処理の手順を示すフローチャートである。10 is a flowchart illustrating a procedure of transmission processing by a CAN communication control unit according to the fourth embodiment. 実施の形態4のCAN通信制御部による受信処理の手順を示すフローチャートである。10 is a flowchart illustrating a procedure of reception processing by a CAN communication control unit according to the fourth embodiment. 実施の形態4のCAN通信制御部による受信処理の手順を示すフローチャートである。10 is a flowchart illustrating a procedure of reception processing by a CAN communication control unit according to the fourth embodiment. 実施の形態4に係る通信システムの効果を説明するための模式図である。FIG. 10 is a schematic diagram for explaining an effect of a communication system according to a fourth embodiment. 従来の通信システムにおける信号波形の一例を示す模式図である。It is a schematic diagram which shows an example of the signal waveform in the conventional communication system. 従来の通信システムにおける信号波形の一例を示す模式図である。It is a schematic diagram which shows an example of the signal waveform in the conventional communication system.
(実施の形態1)
 以下、本発明をその実施の形態を示す図面に基づき具体的に説明する。図1は、通信システムの一構成例を示す模式図である。本実施の形態に係る通信システムは、例えば図示しない車輌に搭載された複数のECU(Electronic Control Unit)1を通信装置として備え、複数のECU1が共通の通信線5を介して接続された構成である。なお、図1においては、複数のECU1にそれぞれ1a~1eの符号を付して区別すると共に、通信線5を幹線5a及び支線5b~5dに区別して図示してある。即ち、図示の通信システムは、ECU1a及び1eが幹線5aを介して接続され、通信線5の幹線5aから分岐した3つの支線5b~5dにそれぞれECU1b~1dが接続された構成である。
(Embodiment 1)
Hereinafter, the present invention will be specifically described with reference to the drawings showing embodiments thereof. FIG. 1 is a schematic diagram illustrating a configuration example of a communication system. The communication system according to the present embodiment includes, for example, a plurality of ECUs (Electronic Control Units) 1 mounted on a vehicle (not shown) as a communication device, and the plurality of ECUs 1 are connected via a common communication line 5. is there. In FIG. 1, the plurality of ECUs 1 are distinguished from each other by being denoted by reference numerals 1a to 1e, and the communication line 5 is distinguished into a trunk line 5a and branch lines 5b to 5d. That is, the illustrated communication system has a configuration in which ECUs 1a and 1e are connected via a trunk line 5a, and ECUs 1b to 1d are connected to three branch lines 5b to 5d branched from the trunk line 5a of the communication line 5, respectively.
 例えばECU1bにて通信線5の支線5bへ信号が出力された場合、この信号は支線5bから幹線5a、支線5cを経てECU1cへ至り、ECU1cの端子部などにて反射された反射波が支線5c、幹線5a、支線5bを経てECU1bへ至る(図1中の破線の矢印参照)。また図1において図示は省略するが、ECU1dにおいても同様の反射波が発生する。このような信号の反射が繰り返されることによって、図26及び図27に示したようなリンギングとなる。なお、支線5b~5dの距離が長くなると、信号の出力元へ反射波が戻るまでの時間が長くなるため、リンギングの周期が長くなり、リンギングが継続する時間(減衰までに要する時間)が長くなる。また通信線5の支線5b~5dの数が多くなる(ECU1の数が多くなる)と、反射波の発生箇所が増加するため、リンギングの振幅が大きくなり、リンギングが減衰するまでに要する時間が長くなる。 For example, when a signal is output to the branch line 5b of the communication line 5 by the ECU 1b, this signal passes from the branch line 5b to the ECU 1c via the trunk line 5a and the branch line 5c, and the reflected wave reflected by the terminal portion of the ECU 1c or the like Then, it reaches the ECU 1b via the trunk line 5a and the branch line 5b (see the broken arrow in FIG. 1). Although not shown in FIG. 1, a similar reflected wave is also generated in the ECU 1d. By repeating such signal reflection, ringing as shown in FIGS. 26 and 27 occurs. As the distance between the branch lines 5b to 5d becomes longer, the time until the reflected wave returns to the signal output source becomes longer. Therefore, the period of ringing becomes longer, and the time for ringing to continue (the time required for attenuation) becomes longer. Become. Further, when the number of branch lines 5b to 5d of the communication line 5 increases (the number of ECUs 1 increases), the number of reflected wave generation points increases, so that the ringing amplitude increases and the time required for the ringing to attenuate is increased. become longer.
 図2は、通信装置(ECU1)の構成を示すブロック図である。ECU1は、制御部11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、入力部14、出力部15及びCAN通信制御部16等を備えて構成されている。制御部11は、CPU(Central Processing Unit)又はMPU(Micro Processing Unit)等の演算処理装置を用いて構成されるものであり、ROM12に記憶された制御プログラムを読み出して実行することにより種々の制御処理を行うことができる。 FIG. 2 is a block diagram showing the configuration of the communication device (ECU 1). The ECU 1 includes a control unit 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, an input unit 14, an output unit 15, a CAN communication control unit 16, and the like. The control unit 11 is configured by using an arithmetic processing unit such as a CPU (Central Processing Unit) or an MPU (Micro Processing Unit), and performs various controls by reading and executing a control program stored in the ROM 12. Processing can be performed.
 ROM12は、例えばEEPROM(Electrically Erasable Programmable ROM)又はフラッシュメモリ等の不揮発性のメモリ素子で構成されるものであり、制御部11にて実行される制御プログラム及び制御部11が行う処理に必要な情報等が予め記憶されている。RAM13は、例えばSRAM(Static RAM)又はDRAM(Dynamic RAM)等のメモリ素子で構成されるものであり、制御部11の処理に伴って生成された情報及び他のECU1との間で送受信する情報等の種々の情報が記憶される。 The ROM 12 is composed of a nonvolatile memory element such as an EEPROM (Electrically Erasable Programmable ROM) or a flash memory, for example, and a control program executed by the control unit 11 and information necessary for processing performed by the control unit 11. Etc. are stored in advance. The RAM 13 is configured by a memory element such as SRAM (Static RAM) or DRAM (Dynamic RAM), for example, and information generated by processing of the control unit 11 and information transmitted to and received from other ECUs 1. Etc. are stored.
 入力部14は、例えば車輌の車速センサ若しくは温度センサ等のセンサ、又は、車輌の内外に配置された操作用の種々のスイッチ等の入力装置からの信号が入力され、入力信号のサンプリング又はA/D変換等の処理を行って得られた情報を制御部11へ与える。出力部15は、例えばモータ又はランプ等の負荷が接続され、制御部11からの指示に応じてこれらの負荷を駆動する駆動信号を出力する。なお、ECU1は必ずしも入力部14及び出力部15の両方を備える必要はなく、いずれか一方のみを備える構成であってよい。 The input unit 14 receives a signal from an input device such as a sensor such as a vehicle speed sensor or a temperature sensor of a vehicle, or various switches for operation arranged inside and outside the vehicle, and performs sampling of the input signal or A / Information obtained by performing processing such as D conversion is given to the control unit 11. The output unit 15 is connected to a load such as a motor or a lamp, and outputs a drive signal for driving these loads in response to an instruction from the control unit 11. Note that the ECU 1 does not necessarily need to include both the input unit 14 and the output unit 15, and may be configured to include only one of them.
 CAN通信制御部16は、通信線5に接続される端子を有しており、この端子に接続された通信線5を介して他のECU1との間でCANプロトコルに従った情報の送受信を行うものである。CAN通信制御部16は、制御部11から与えられた送信情報をCANプロトコルに応じた送信用のデータ(フレーム)に変換して送信部17へ与える。CAN通信制御部16の送信部17は、与えられた送信データの各ビットの値(0(ドミナント)又は1(レセシブ))に応じて、通信線5へ信号を出力する。なおCANプロトコルにおいては、通信線5としてツイスト線が用いられ、送信部17は通信線5へ差動信号を出力する。送信部17は、複数ビットで構成された送信データの各ビットについて順に処理を行い、処理対象ビットの値がドミナントの場合には所定信号レベルの短い信号を出力した後で端子をハイインピーダンス状態とし、処理対象ビットの値がレセシブの場合には端子をハイインピーダンス状態とする。 The CAN communication control unit 16 has a terminal connected to the communication line 5, and transmits / receives information to / from another ECU 1 according to the CAN protocol via the communication line 5 connected to the terminal. Is. The CAN communication control unit 16 converts the transmission information given from the control unit 11 into transmission data (frame) according to the CAN protocol and gives the data to the transmission unit 17. The transmission unit 17 of the CAN communication control unit 16 outputs a signal to the communication line 5 according to the value of each bit of the given transmission data (0 (dominant) or 1 (recessive)). In the CAN protocol, a twist line is used as the communication line 5, and the transmission unit 17 outputs a differential signal to the communication line 5. The transmission unit 17 sequentially processes each bit of the transmission data composed of a plurality of bits, and when the value of the processing target bit is dominant, outputs a short signal of a predetermined signal level, and then sets the terminal to a high impedance state. When the value of the processing target bit is recessive, the terminal is set to a high impedance state.
 またCAN通信制御部16は、通信線5の信号レベル(ツイスト線の電位差)を検知することによって、通信線5上に送信された信号がドミナント/レセシブのいずれに対応する信号であるかを判定し、各ビットがドミナント/レセシブの2値で表されるデータの受信を行う受信部18を有している。CAN通信制御部16は、受信部18にて受信したデータを制御部11へ与える。またCAN通信制御部16は、送信部17にて自らが送信したデータを受信部18にて受信し、送信データと受信データとが一致しない場合(送信データのレセシブが受信データにてドミナントに変化していた場合)、通信線5に接続された他のECU1の送信との衝突が発生していることを検知し、アービトレーションの処理を行う。なおECU1が行うアービトレーションの処理は、従来のCANプロトコルによるものと同じであるため、詳細な説明を省略する。 Further, the CAN communication control unit 16 determines whether the signal transmitted on the communication line 5 is a signal corresponding to dominant / recessive by detecting the signal level of the communication line 5 (potential difference of the twist line). The receiving unit 18 receives data in which each bit is represented by a dominant / recessive binary value. The CAN communication control unit 16 gives the data received by the receiving unit 18 to the control unit 11. Further, the CAN communication control unit 16 receives the data transmitted by the transmission unit 17 at the reception unit 18, and when the transmission data and the reception data do not match (the recessiveness of the transmission data changes to dominant in the reception data). In the case where a collision has occurred with the transmission of another ECU 1 connected to the communication line 5, arbitration processing is performed. The arbitration process performed by the ECU 1 is the same as that performed by the conventional CAN protocol, and thus detailed description thereof is omitted.
 図3は、本発明に係る通信システムにおいて各ECU1が送受信する信号を説明するための模式図であり、縦軸を通信線5のツイスト線間の電位差[V]とし、横軸を時間[n秒]としたグラフである。また図3においては、上段に送信信号を示し、下段に受信信号を示してある。図示の例では、ECU1は1Mbpsの通信速度でCANプロトコルに応じた通信を行う構成、即ち1ビットのデータ送信時間が1000nsの通信システムを想定している。また図示の例では、送信部17が0ns~1000nsにドミナントに対応する信号を出力し、1000ns~2000nsにレセシブに対応する信号を出力した場合の波形を示してある。 FIG. 3 is a schematic diagram for explaining a signal transmitted and received by each ECU 1 in the communication system according to the present invention. The vertical axis represents a potential difference [V] between twist lines of the communication line 5 and the horizontal axis represents time [n. [Second]. Further, in FIG. 3, the transmission signal is shown in the upper part and the reception signal is shown in the lower part. In the illustrated example, it is assumed that the ECU 1 performs a communication according to the CAN protocol at a communication speed of 1 Mbps, that is, a communication system with a 1-bit data transmission time of 1000 ns. In the example shown in the figure, waveforms are shown when the transmission unit 17 outputs a signal corresponding to dominant from 0 ns to 1000 ns and outputs a signal corresponding to recessive from 1000 ns to 2000 ns.
 ECU1の送信部17は、ドミナントのデータ送信を行う場合、1ビットの送信時間1000nsのうち開始時点から400nsまでの期間に、所定信号レベル(2V)の信号(パルス信号)を出力した後、400ns~1000nsの期間は信号を出力せずに端子をハイインピーダンス状態とする。また送信部17は、レセシブのデータ送信を行う場合、1ビットの送信時間(図3の1000ns~2000nsの期間)の全てについて信号を出力せずに端子をハイインピーダンス状態とする。 When transmitting the dominant data, the transmission unit 17 of the ECU 1 outputs a signal (pulse signal) of a predetermined signal level (2 V) during a period from the start time to 400 ns in the 1-bit transmission time 1000 ns, and then 400 ns. During a period of ˜1000 ns, no signal is output and the terminal is in a high impedance state. Further, when performing the recessive data transmission, the transmission unit 17 sets the terminal in a high impedance state without outputting a signal for the entire transmission time of 1 bit (period of 1000 ns to 2000 ns in FIG. 3).
 上記のような信号を送信部17が通信線5へ出力した場合、通信線5上の信号は反射波などの影響による例えば図3の下段に示すような波形となる。送信部17が所定信号レベルの信号を出力する0ns~400nsの期間は、通信線5上の信号は所定信号レベルの近傍で歪んだ波形となる。また送信部17が端子をハイインピーダンス状態とする400ns~2000nsの期間は、通信線5上の信号は、約0Vを中心として振動すると共に、時間経過に従って徐々に減衰する波形、即ちリンギングの波形となる。 When the transmitter 17 outputs the above signal to the communication line 5, the signal on the communication line 5 has a waveform as shown in the lower part of FIG. During the period from 0 ns to 400 ns when the transmitter 17 outputs a signal of a predetermined signal level, the signal on the communication line 5 has a distorted waveform in the vicinity of the predetermined signal level. Further, during a period of 400 ns to 2000 ns in which the transmission unit 17 puts the terminal in a high impedance state, the signal on the communication line 5 vibrates around about 0V and gradually attenuates over time, that is, a ringing waveform. Become.
 ECU1の受信部18は、各ビットの送信時間1000nsのうち開始時点から所定期間(例えば400ns)に亘って、通信線5の信号レベルを例えば5ns周期でサンプリングしている。受信部18は、所定期間のサンプリング結果から信号レベルの平均値を算出し、算出した平均値が予め定められた閾値を超えるか否かに応じて、ドミナント/レセシブの判定を行う。図3下段に示す例では、0ns~400nsの信号レベルの平均は約1.7Vであり、受信部18は例えば1Vを閾値として判定を行うことによって、0ns~1000nsの期間はドミナントの送信が行われていると判定する。また1000ns~1400nsの信号レベルの平均は約0Vであり、受信部18はこの期間にレセシブの送信が行われていると判定する。 The reception unit 18 of the ECU 1 samples the signal level of the communication line 5 at a cycle of 5 ns, for example, over a predetermined period (for example, 400 ns) from the start time of the transmission time 1000 ns of each bit. The receiving unit 18 calculates an average value of the signal level from the sampling result of a predetermined period, and performs dominant / recessive determination according to whether or not the calculated average value exceeds a predetermined threshold value. In the example shown in the lower part of FIG. 3, the average signal level from 0 ns to 400 ns is about 1.7 V, and the receiving unit 18 performs determination using, for example, 1 V as a threshold, so that dominant transmission is performed during the period from 0 ns to 1000 ns. It is determined that The average of the signal levels from 1000 ns to 1400 ns is about 0 V, and the receiving unit 18 determines that recessive transmission is performed during this period.
 次に、本発明に係る通信システムのシミュレーションによる評価結果を説明する。本シミュレーションでは、通信速度を1Mビット/s(即ち1ビットのデータ送信時間を1000ns)とし、受信部18が5ns周期で信号レベルのサンプリングを行うものとした。また各サンプリング結果について、雑音の標準偏差σ=1V/サンプルを考慮した。またサンプリング結果の平均値との比較を行う閾値は0.85Vとした。また本シミュレーションは、リンギングの影響が最も大きいドミナント→レセシブのデータを送信した場合について行った。この条件において、ドミナントの送信時に送信部17が出力する信号の信号幅をTpとし、受信部18が信号レベルのサンプリングを行う期間をTdとした場合に、通信エラー(ビット誤り率)が最小となるTp及びTdの組み合わせについて検討する。 Next, an evaluation result by simulation of the communication system according to the present invention will be described. In this simulation, it is assumed that the communication speed is 1 Mbit / s (that is, 1-bit data transmission time is 1000 ns), and the receiving unit 18 samples the signal level at a cycle of 5 ns. For each sampling result, the standard deviation of noise σ = 1 V / sample was considered. The threshold for comparison with the average value of the sampling results was set to 0.85V. In this simulation, the dominant → recessive data with the largest ringing effect was transmitted. Under this condition, when the signal width of the signal output from the transmitter 17 during dominant transmission is Tp and the period during which the receiver 18 samples the signal level is Td, the communication error (bit error rate) is minimized. Consider a combination of Tp and Td.
 図4A及び図4Bは、シミュレーションにより評価を行った通信システムの構成を説明するための模式図である。本シミュレーションは、通信に厳しい2つの条件を考慮して行った。図4Aに示す条件1は、送信側のECU1から受信側のECU1までの距離が長く、信号の伝搬遅延が厳しい条件である。条件1では、送信側及び受信側のECU1間の距離(通信線5の長さ)を15m(車輌における通信線5の最長距離)とし、送信側及び受信側のECU1での負荷インピーダンスを120Ωとした。また図4Bに示す条件2は、リンギングが厳しい条件である。条件2では、ECU1が自ら送信した信号を受信するものとし、ECU1が接続される通信線5の支線の長さを2mとし、ECU1の負荷インピーダンスを40kΩとした。なおビット誤り率BERは、下記の(1)式で算出される。なお(1)式において、A1はドミナントに対応する信号にて受信部18が算出する信号レベルの平均値を示し、A0はレセシブに対応する信号にて受信部18が算出する信号レベルの平均値を示し、Tsはサンプリング時間を示し、erfc()は相補誤差関数である。 4A and 4B are schematic diagrams for explaining the configuration of the communication system evaluated by simulation. This simulation was performed in consideration of two conditions that are severe for communication. Condition 1 shown in FIG. 4A is a condition in which the distance from the transmission-side ECU 1 to the reception-side ECU 1 is long and signal propagation delay is severe. In condition 1, the distance between the transmission-side and reception-side ECU 1 (the length of the communication line 5) is 15 m (the longest distance of the communication line 5 in the vehicle), and the load impedance in the transmission-side and reception-side ECU 1 is 120Ω. did. Condition 2 shown in FIG. 4B is a condition in which ringing is severe. Under condition 2, the ECU 1 receives a signal transmitted by itself, the length of the branch line of the communication line 5 to which the ECU 1 is connected is 2 m, and the load impedance of the ECU 1 is 40 kΩ. The bit error rate BER is calculated by the following equation (1). In the equation (1), A1 indicates an average value of the signal level calculated by the receiving unit 18 with the signal corresponding to the dominant, and A0 indicates an average value of the signal level calculated by the receiving unit 18 with the signal corresponding to the recessive. , Ts indicates the sampling time, and erfc () is a complementary error function.
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
 図5は、シミュレーション結果を示すグラフであり、横軸をパルス幅Tpとし、縦軸をビット誤り率としたものである。図示のグラフでは、条件1によるシミュレーション結果を破線で示し、条件2によるシミュレーション結果を一点鎖線で示し、両条件の平均を実線で示してある。また図示のグラフでは、ドミナントに対して出力する信号のパルス幅Tpについて、100nsから1000nsまで100ns間隔でシミュレーション結果をプロットしてある。図示のグラフから、ビット誤り率の平均値が最小となるのはパルス幅Tp=400nsであった。またシミュレーション結果の図示は省略するが、パルス幅Tp=400nsに対して、最もビット誤り率の平均値が最小となるサンプリング期間Td=345nsであった。よって本実施の形態の通信システムが通信速度1Mbpsの通信を行う場合、送信部17がドミナントに対して出力する信号のパルス幅Tp=400nsとし、受信部18によるサンプリング期間Td=345nsとすることにより、ビット誤り率が最小となる高精度な通信を実現できる。 FIG. 5 is a graph showing the simulation results, in which the horizontal axis is the pulse width Tp and the vertical axis is the bit error rate. In the illustrated graph, the simulation result under condition 1 is indicated by a broken line, the simulation result under condition 2 is indicated by a one-dot chain line, and the average of both conditions is indicated by a solid line. In the illustrated graph, the simulation results are plotted at intervals of 100 ns from 100 ns to 1000 ns with respect to the pulse width Tp of the signal output to the dominant. From the graph shown, the pulse width Tp = 400 ns has the smallest bit error rate average value. Although illustration of the simulation result is omitted, the sampling period Td = 345 ns in which the average value of the bit error rate is the smallest with respect to the pulse width Tp = 400 ns. Therefore, when the communication system of the present embodiment performs communication at a communication speed of 1 Mbps, the pulse width Tp of the signal output from the transmitter 17 to the dominant is set to 400 ns, and the sampling period Td by the receiver 18 is set to 345 ns. Therefore, it is possible to realize highly accurate communication with a minimum bit error rate.
 図6は、送信部17による送信処理の手順を示すフローチャートである。CAN通信制御部16の送信部17は、まず、送信すべきデータの中から送信対象とする1ビットの情報を取得し(ステップS1)、この1ビットがドミナントであるか否かを判定する(ステップS2)。送信対象の1ビットがドミナントである場合(S2:YES)、送信部17は、通信線5に対して所定信号レベルの信号出力を行う(ステップS3)。次いで送信部17は、この信号の出力開始から定められたパルス幅Tpに相当する時間(所定時間Tp)が経過したか否かを更に判定し(ステップS4)、パルス幅Tpに相当する時間が経過していない場合(S4:NO)、ステップS3へ処理を戻し、信号出力を継続して行う。 FIG. 6 is a flowchart showing a procedure of transmission processing by the transmission unit 17. The transmission unit 17 of the CAN communication control unit 16 first acquires 1-bit information to be transmitted from the data to be transmitted (step S1), and determines whether or not this 1-bit is dominant (step S1). Step S2). If 1 bit to be transmitted is dominant (S2: YES), the transmission unit 17 outputs a signal at a predetermined signal level to the communication line 5 (step S3). Next, the transmitter 17 further determines whether or not a time (predetermined time Tp) corresponding to the pulse width Tp determined from the start of output of this signal has passed (step S4), and the time corresponding to the pulse width Tp. If it has not elapsed (S4: NO), the process returns to step S3 to continue signal output.
 定められたパルス幅Tpに相当する時間が経過した場合(S4:YES)、送信部17は、信号出力を停止して、端子をハイインピーダンス状態とする(ステップS5)。また、送信対象とする1ビットがドミナントでない場合(S2:NO)、即ちレセシブの場合も同様に、送信部17は、信号出力を行わずに、端子をハイインピーダンス状態とする(ステップS5)。その後、送信部17は、1ビットの送信時間が経過したか否かを判定し(ステップS6)、1ビットの送信時間が経過していない場合には(S6:NO)、ステップS5へ処理を戻し、ハイインピーダンス状態を継続する。1ビットの送信時間が経過した場合(S6:YES)、送信部17は、送信データの全ビットの送信を終えたか否かなどを判定することによって、送信を終了するか否かを更に判定する(ステップS7)。送信を終了しないと判定した場合(S7:NO)、送信部17は、ステップS1へ処理を戻し、送信データの次のビットについて同様の処理を行う。送信を終了すると判定した場合(S7:YES)、送信部17は、送信処理を終了する。 When the time corresponding to the determined pulse width Tp has elapsed (S4: YES), the transmission unit 17 stops signal output and places the terminal in a high impedance state (step S5). Similarly, when 1 bit to be transmitted is not dominant (S2: NO), that is, in the case of recessive, similarly, the transmission unit 17 sets the terminal in a high impedance state without performing signal output (step S5). Thereafter, the transmission unit 17 determines whether or not the 1-bit transmission time has elapsed (step S6). If the 1-bit transmission time has not elapsed (S6: NO), the process proceeds to step S5. Return and continue high impedance state. When the transmission time of 1 bit has elapsed (S6: YES), the transmission unit 17 further determines whether or not to end transmission by determining whether or not transmission of all the bits of the transmission data has been completed. (Step S7). When it determines with not complete | finishing transmission (S7: NO), the transmission part 17 returns a process to step S1, and performs the same process about the next bit of transmission data. When it is determined that the transmission is to be ended (S7: YES), the transmission unit 17 ends the transmission process.
 図7は、受信部18による受信処理の手順を示すフローチャートである。CAN通信制御部16の受信部18は、通信線5の信号レベルが予め定められた閾値を超えたか否かを判定し(ステップS20)、信号レベルが閾値を超えない場合(S20:NO)、信号レベルが閾値を超えるまで待機する。信号レベルが閾値を超えた場合(S20:YES)、受信部18は、通信線5の信号レベルのサンプリングを行い(ステップS21)、サンプリング開始からサンプリング期間Tdが経過したか否かを判定する(ステップS22)。サンプリング期間Tdが経過していないと判定した場合(S22:NO)、受信部18は、ステップS21へ処理を戻し、信号レベルのサンプリングを繰り返し行う。 FIG. 7 is a flowchart showing a procedure of reception processing by the reception unit 18. The receiving unit 18 of the CAN communication control unit 16 determines whether or not the signal level of the communication line 5 has exceeded a predetermined threshold (step S20), and if the signal level does not exceed the threshold (S20: NO), Wait until the signal level exceeds the threshold. When the signal level exceeds the threshold (S20: YES), the receiving unit 18 samples the signal level of the communication line 5 (step S21), and determines whether the sampling period Td has elapsed since the start of sampling (step S21). Step S22). If it is determined that the sampling period Td has not elapsed (S22: NO), the receiving unit 18 returns the process to step S21 and repeats sampling of the signal level.
 サンプリング期間Tdが経過したと判定した場合(S22:YES)、受信部18は、サンプリング期間Tdにてサンプリングした複数の信号レベルの平均値を算出し(ステップS23)、算出した平均値が予め定められた閾値を超えるか否かを判定する(ステップS24)。信号レベルの平均値が閾値を超えると判定した場合(S24:YES)、受信部18は、受信した信号がドミナントに対応するものであると判定し(ステップS25)、ステップS27へ処理を進める。また信号レベルの平均値が閾値を超えないと判定した場合(S24:NO)、受信部18は、受信した信号がレセシブに対応するものであると判定し(ステップS26)、ステップS29へ処理を進める。 When it is determined that the sampling period Td has elapsed (S22: YES), the receiving unit 18 calculates an average value of a plurality of signal levels sampled in the sampling period Td (step S23), and the calculated average value is determined in advance. It is determined whether or not the determined threshold value is exceeded (step S24). When it determines with the average value of a signal level exceeding a threshold value (S24: YES), the receiving part 18 determines with the received signal corresponding to a dominant (step S25), and advances a process to step S27. When it is determined that the average signal level does not exceed the threshold (S24: NO), the receiving unit 18 determines that the received signal corresponds to recessive (step S26), and the process proceeds to step S29. Proceed.
 また受信部18は、ステップS25にて受信した信号がドミナントであると判定した後、この信号のサンプリングを行っていた期間に送信部17がレセシブの送信を行っていたか否かを判定する(ステップS27)。送信部17がレセシブの送信を行っていた場合(S27:YES)、送信したレセシブがドミナントに変化しているため、受信部18は、他のECU1が信号を送信したことを検知し(ステップS28)、ステップS29へ処理を進める。また送信部17がレセシブの送信を行っていない場合(S27:NO)、受信部18は、他のECU1の信号送信を検知することなく、ステップS29へ処理を進める。 In addition, after determining that the signal received in step S25 is dominant, the reception unit 18 determines whether or not the transmission unit 17 was performing recessive transmission during the period during which the signal was sampled (step S25). S27). When the transmission unit 17 is performing recessive transmission (S27: YES), since the transmitted recessive has changed to dominant, the reception unit 18 detects that another ECU 1 has transmitted a signal (step S28). ), The process proceeds to step S29. If the transmission unit 17 is not performing recessive transmission (S27: NO), the reception unit 18 proceeds to step S29 without detecting the signal transmission of the other ECU1.
 その後、受信部18は、1ビットの送信時間が経過したか否かを判定し(ステップS29)、1ビットの送信時間が経過していない場合には(S29:NO)、この時間が経過するまで待機する。1ビットの送信時間が経過した場合(S29:YES)、受信部18は、ステップS20へ処理を戻し、次のビットについて同様の受信処理を行う。 Thereafter, the receiving unit 18 determines whether or not the 1-bit transmission time has elapsed (step S29). If the 1-bit transmission time has not elapsed (S29: NO), this time has elapsed. Wait until. When the transmission time of 1 bit has elapsed (S29: YES), the reception unit 18 returns the process to step S20 and performs the same reception process for the next bit.
 以上の構成の通信システムは、ECU1の送信部17が、送信データがドミナントの場合に、1ビット分の送信時間より短いパルス幅Tpに亘る所定信号レベルの信号を通信線5へ出力し、その後は通信線5へ信号出力を停止してハイインピーダンス状態とすると共に、送信データがレセシブの場合に、通信線5へ信号出力をせずハイインピーダンス状態とする。これにより、ドミナントに対応する信号の出力後にリンギングが発生した場合であっても、次のビットの送信時間に至るまでにリンギングを減衰させることができるため、各ビットにおけるドミナント/レセシブの判定を早いタイミングで行うことが可能となり、通信の高速化を実現することができる。 In the communication system configured as described above, the transmission unit 17 of the ECU 1 outputs a signal of a predetermined signal level over the pulse width Tp shorter than the transmission time of 1 bit to the communication line 5 when the transmission data is dominant, and then Stops the signal output to the communication line 5 to be in a high impedance state, and when the transmission data is recessive, does not output a signal to the communication line 5 to be in a high impedance state. As a result, even if ringing occurs after the signal corresponding to the dominant is output, the ringing can be attenuated until the transmission time of the next bit, so that the dominant / recessive determination in each bit can be performed quickly. It is possible to perform at the timing, and it is possible to realize high speed communication.
 また、ECU1の受信部18が、サンプリング期間Tdに亘って通信線5の信号レベルをサンプリングし、サンプリングした信号レベルの平均値を算出し、算出した平均値が閾値を超えるか否かに応じてドミナント/レセシブの判定を行う構成とすることにより、0V近傍にて正負の振幅を繰り返すリンギングの影響を低減して、データ受信及びアービトレーション等の処理を高精度に行うことができる。 Further, the receiving unit 18 of the ECU 1 samples the signal level of the communication line 5 over the sampling period Td, calculates an average value of the sampled signal levels, and depending on whether the calculated average value exceeds a threshold value. By adopting a configuration that performs dominant / recessive determination, it is possible to reduce the influence of ringing that repeats positive and negative amplitudes in the vicinity of 0 V, and to perform processing such as data reception and arbitration with high accuracy.
 なお、本実施の形態においては、通信システムが車輌に搭載されるものとしたが、これに限るものではない。また、図1に示した通信システムの構成(ECU1の数、ECU1の接続形態等)は、一例であってこれに限るものではない。また、通信線5としてツイスト線を用いる構成としたが、これに限るものではなく、1つのケーブルを通信線5として用いるなど、その他の構成であってよい。 In the present embodiment, the communication system is mounted on the vehicle, but the present invention is not limited to this. The configuration of the communication system shown in FIG. 1 (the number of ECUs 1, the connection form of the ECU 1, etc.) is merely an example, and the present invention is not limited to this. Further, although the twisted line is used as the communication line 5, the present invention is not limited to this, and other structures such as using one cable as the communication line 5 may be used.
(実施の形態2)
 上述の実施の形態1に係る通信システムは、ECU1の受信部18が通信線5の信号レベルをサンプリングし、サンプリング結果の信号レベルの平均値を算出し、この平均値が閾値を超えるか否かに応じてドミナント/レセシブの判定を行う構成である。これに対して実施の形態2に係る通信システムは、ECU1の受信部18が通信線5の信号レベルをサンプリングする点は同様であるが、その後のドミナント/レセシブの判定方法が異なる。実施の形態2に係る通信システムでは、受信部18が各サンプリング結果の信号レベルと閾値との比較を行い、信号レベルが閾値を超えたサンプル数と、信号レベルが閾値を超えないサンプル数とによる多数決判定を行って、ドミナント/レセシブの判定を行う構成である。
(Embodiment 2)
In the communication system according to the first embodiment described above, the receiving unit 18 of the ECU 1 samples the signal level of the communication line 5, calculates the average value of the signal level of the sampling result, and whether or not this average value exceeds the threshold value. In this configuration, dominant / recessive determination is performed. On the other hand, the communication system according to the second embodiment is similar in that the reception unit 18 of the ECU 1 samples the signal level of the communication line 5, but the subsequent dominant / recessive determination method is different. In the communication system according to the second embodiment, the receiving unit 18 compares the signal level of each sampling result with a threshold value, and depends on the number of samples whose signal level exceeds the threshold value and the number of samples whose signal level does not exceed the threshold value. The configuration is such that a majority decision is made and a dominant / recessive decision is made.
 実施の形態2のECU1の受信部18は、各ビットの送信時間(例えば1000ns)のうち開始時点から所定期間(例えば400ns)に亘って、通信線5の信号レベルを所定周期(例えば5ns周期)でサンプリングし、信号レベルと閾値との比較を所定周期で行っている。例えば受信部18は、通信線5の信号がCMOS回路へ入力される構成とすることができ、このCMOS回路が出力する信号を所定周期で取得する。 The receiving unit 18 of the ECU 1 according to the second embodiment sets the signal level of the communication line 5 over a predetermined period (for example, 400 ns) from the start point in the transmission time of each bit (for example, 1000 ns) for a predetermined period (for example, 5 ns period). The signal level is compared with the threshold value at a predetermined cycle. For example, the receiving unit 18 can be configured such that the signal of the communication line 5 is input to the CMOS circuit, and acquires the signal output from the CMOS circuit at a predetermined period.
 また受信部18は、信号レベルと閾値との比較結果を計数する2つのカウンタを有しており、信号レベルが閾値を超えたサンプル数と、信号レベルが閾値を超えないサンプル数とをそれぞれのカウンタにて計数している。例えば受信部18は、上記のCMOS回路の出力信号に応じて2つのカウンタのいずれか一方をカウントアップする構成とすることができる。 The receiving unit 18 includes two counters that count the comparison result between the signal level and the threshold value. The number of samples whose signal level exceeds the threshold value and the number of samples whose signal level does not exceed the threshold value are respectively set. It counts with the counter. For example, the receiving unit 18 can be configured to count up one of the two counters in accordance with the output signal of the CMOS circuit.
 所定期間の経過後、受信部18は、2つのカウンタの値を比較し、信号レベルが閾値を超えたサンプル数が閾値を超えないサンプル数より多い場合、この期間にドミナントの送信が行われていたと判定する。また受信部18は、信号レベルが閾値を超えたサンプル数が閾値を超えないサンプル数より少ない場合、この期間にレセシブの送信が行われていたと判定する。 After the elapse of a predetermined period, the receiving unit 18 compares the values of the two counters. If the number of samples whose signal level exceeds the threshold is greater than the number of samples not exceeding the threshold, dominant transmission is performed during this period. It is determined that Further, when the number of samples whose signal level exceeds the threshold is smaller than the number of samples that does not exceed the threshold, the receiving unit 18 determines that recessive transmission has been performed during this period.
 次に、実施の形態2に係る通信システムのシミュレーションによる評価結果を説明する。本シミュレーションでは、通信線5にて送受信される信号の振幅(ツイストケーブル間の電位差)を2.0Vとし、受信部18のCMOS回路の判定レベルを0.9Vとし、信号の最大遅延を0.5μsとし、受信部18が100ns周期で信号レベル(CMOS回路の出力)のサンプリングを行うものとした。また実施の形態1に係る通信システムのシミュレーションと同様に、図4A及び図4Bに示した2つの条件(ただし条件2の送受信間距離は0mとした)について、実施の形態2の通信システムのシミュレーションを行った。この条件において、ドミナントの送信時に送信部17が出力する信号の信号幅(パルス幅)をTpとし、受信部18が信号レベルのサンプリングを行う期間をTdとした場合に、多数決判定による通信の正誤(成功/失敗)を検討する。 Next, evaluation results by simulation of the communication system according to Embodiment 2 will be described. In this simulation, the amplitude (potential difference between twisted cables) of signals transmitted and received on the communication line 5 is set to 2.0 V, the determination level of the CMOS circuit of the receiving unit 18 is set to 0.9 V, and the maximum signal delay is set to 0. 5 μs, and the receiver 18 samples the signal level (output of the CMOS circuit) at a cycle of 100 ns. Similarly to the simulation of the communication system according to the first embodiment, the simulation of the communication system according to the second embodiment is performed for the two conditions shown in FIGS. 4A and 4B (where the distance between transmission and reception in the condition 2 is 0 m). Went. Under this condition, when the signal width (pulse width) of the signal output from the transmission unit 17 during dominant transmission is Tp and the period during which the reception unit 18 samples the signal level is Td, the communication error by majority decision is determined. Consider (success / failure).
 図8は、実施の形態2のシミュレーション結果を示す表である。図示の表は、パルス幅Tpを0.1μsから1.0μsまで0.1μs間隔で変化させ、サンプリング期間Tdを0.1μsから0.5μsまで変化させた場合の、Tp及びTdの各組み合わせについて、誤りなく通信を行うことができた場合を”正”とし、誤りが生じた場合を”誤”として、シミュレーション結果を記載したものである。なお、表中に”-”と記載した組み合わせは、シミュレーションを行っていない(パルス幅Tpよりサンプリング期間Tdを長く設定することはできないため)。なおシミュレーション結果は、Tp及びTdの各組み合わせについて、条件1及び条件2の両条件においてドミナント及びレセシブの両値の判定に誤りが生じなかったものを”正”としてあり、いずれかにて誤りが生じたものを”誤”としてある。 FIG. 8 is a table showing the simulation results of the second embodiment. The table shown in the figure shows each combination of Tp and Td when the pulse width Tp is changed from 0.1 μs to 1.0 μs at intervals of 0.1 μs and the sampling period Td is changed from 0.1 μs to 0.5 μs. The simulation result is described as “correct” when communication can be performed without error and as “error” when an error occurs. Note that the combinations indicated by “−” in the table are not simulated (since the sampling period Td cannot be set longer than the pulse width Tp). In the simulation results, for each combination of Tp and Td, “Positive” indicates that no error has occurred in the determination of both dominant and recessive values under both conditions 1 and 2, and there is an error in either case. What happened is called "false".
 図示のシミュレーションの結果から、パルス幅Tpが長い場合、リンギングの影響が現れるため、通信のドミナント/レセシブの判定に誤りが生じることが分かる。これに対してサンプリング期間Tdを長くすることによって、誤りの発生を抑制することができる。 From the simulation results shown in the figure, it can be seen that, when the pulse width Tp is long, the influence of ringing appears, so that an error occurs in the determination of dominant / recessive communication. On the other hand, the occurrence of errors can be suppressed by increasing the sampling period Td.
 図9及び図10は、実施の形態2の受信部18による受信処理の手順を示すフローチャートである。なお本処理においては、受信部18がDカウンタ及びRカウンタの2つのカウンタを用いて処理を行うものとする。実施の形態2のCAN通信部16の受信部18は、まず、Dカウンタ及びRカウンタの2つのカウンタを初期化する(ステップS41)。次いで受信部18は、通信線5の信号レベルが予め定められた閾値を超えたか否かを判定し(ステップS42)、信号レベルが閾値を超えない場合(S42:NO)、信号レベルが閾値を超えるまで待機する。 FIG. 9 and FIG. 10 are flowcharts showing a procedure of reception processing by the reception unit 18 of the second embodiment. In this processing, it is assumed that the receiving unit 18 performs processing using two counters, a D counter and an R counter. The receiving unit 18 of the CAN communication unit 16 according to the second embodiment first initializes two counters, a D counter and an R counter (step S41). Next, the receiving unit 18 determines whether or not the signal level of the communication line 5 has exceeded a predetermined threshold (step S42), and if the signal level does not exceed the threshold (S42: NO), the signal level exceeds the threshold. Wait until it exceeds.
 信号レベルが閾値を超えた場合(S42:YES)、受信部18は、通信線5の信号レベルのサンプリングを行い(ステップS43)、サンプリングした信号の信号レベルが閾値を超えるか否かを判定する(ステップS44)。なおステップS42の閾値と、ステップS44の閾値とは同じ値であってよい。受信部18は、信号レベルが閾値を超える場合(S44:YES)、Dカウンタをカウントアップし(ステップS45)、また、信号レベルが閾値を超えない場合(S44:NO)、Rカウンタをカウントアップする(ステップS46)。 When the signal level exceeds the threshold (S42: YES), the reception unit 18 samples the signal level of the communication line 5 (step S43), and determines whether the signal level of the sampled signal exceeds the threshold. (Step S44). Note that the threshold value in step S42 and the threshold value in step S44 may be the same value. When the signal level exceeds the threshold value (S44: YES), the reception unit 18 counts up the D counter (step S45). When the signal level does not exceed the threshold value (S44: NO), the reception unit 18 counts up the R counter. (Step S46).
 Dカウンタ又はRカウンタをカウントアップした後、受信部18は、サンプリング開始からサンプリング期間Tdが経過したか否かを判定する(ステップS47)。サンプリング期間Tdが経過していないと判定した場合(S47:NO)、受信部18は、ステップS43へ処理を戻し、信号レベルのサンプリング及び閾値との比較を繰り返し行う。 After counting up the D counter or the R counter, the receiving unit 18 determines whether or not the sampling period Td has elapsed from the start of sampling (step S47). When it is determined that the sampling period Td has not elapsed (S47: NO), the receiving unit 18 returns the process to step S43, and repeatedly performs sampling of the signal level and comparison with the threshold value.
 サンプリング期間Tdが経過したと判定した場合(S47:YES)、受信部18は、2つのカウンタの値を比較し、Dカウンタの値がRカウンタの値を超えるか否かを判定する(ステップS48)。Dカウンタの値がRカウンタの値を超えると判定した場合(S48:YES)、受信部18は、受信した信号がドミナントに対応するものであると判定し(ステップS49)、ステップS51へ処理を進める。またDカウンタの値がRカウンタの値を超えないと判定した場合(S48:NO)、受信部18は、受信した信号がレセシブに対応するものであると判定し(ステップS50)、ステップS53へ処理を進める。 When it is determined that the sampling period Td has elapsed (S47: YES), the receiving unit 18 compares the values of the two counters and determines whether or not the value of the D counter exceeds the value of the R counter (step S48). ). If it is determined that the value of the D counter exceeds the value of the R counter (S48: YES), the receiving unit 18 determines that the received signal corresponds to a dominant (step S49), and the process proceeds to step S51. Proceed. If it is determined that the value of the D counter does not exceed the value of the R counter (S48: NO), the receiving unit 18 determines that the received signal corresponds to recessive (step S50), and proceeds to step S53. Proceed with the process.
 また受信部18は、ステップS49にて受信した信号がドミナントであると判定した後、この信号のサンプリングを行っていた期間に送信部17がレセシブの送信を行っていたか否かを判定する(ステップS51)。送信部17がレセシブの送信を行っていた場合(S51:YES)、送信したレセシブがドミナントに変化しているため、受信部18は、他のECU1が信号を送信したことを検知し(ステップS52)、ステップS53へ処理を進める。また送信部17がレセシブの送信を行っていない場合(S51:NO)、受信部18は、他のECU1の信号送信を検知することなく、ステップS53へ処理を進める。 Further, after determining that the signal received in step S49 is dominant, the reception unit 18 determines whether or not the transmission unit 17 is performing a recessive transmission during the period during which the signal was sampled (step S49). S51). When the transmission unit 17 is performing recessive transmission (S51: YES), since the transmitted recessive has changed to dominant, the reception unit 18 detects that another ECU 1 has transmitted a signal (step S52). ), The process proceeds to step S53. If the transmission unit 17 is not performing recessive transmission (S51: NO), the reception unit 18 proceeds to step S53 without detecting the signal transmission of the other ECU1.
 その後、受信部18は、1ビットの送信時間が経過したか否かを判定し(ステップS53)、1ビットの送信時間が経過していない場合には(S53:NO)、この時間が経過するまで待機する。1ビットの送信時間が経過した場合(S53:YES)、受信部18は、ステップS41へ処理を戻し、次のビットについて同様の受信処理を行う。 Thereafter, the receiving unit 18 determines whether or not the 1-bit transmission time has elapsed (step S53). If the 1-bit transmission time has not elapsed (S53: NO), this time has elapsed. Wait until. When the transmission time of 1 bit has elapsed (S53: YES), the reception unit 18 returns the process to step S41, and performs the same reception process for the next bit.
 以上の構成の実施の形態2に係る通信システムは、ECU1の受信部18が、サンプリング期間Tdに亘って通信線5の信号レベルをサンプリングし、サンプリングした信号レベルが閾値と閾値との比較を行って、信号レベルが閾値を超えるサンプル数と、信号レベルが閾値を超えないサンプル数とに応じてドミナント/レセシブの判定を行う構成である。この実施の形態2に係る通信システムの構成は、実施の形態1に係る通信システムの構成と比較して、受信部18の回路構成を容易化することができるため、ECU1の低価格化等を実現することができる。 In the communication system according to Embodiment 2 configured as described above, the receiving unit 18 of the ECU 1 samples the signal level of the communication line 5 over the sampling period Td, and the sampled signal level compares the threshold value with the threshold value. Thus, the dominant / recessive determination is performed according to the number of samples whose signal level exceeds the threshold and the number of samples whose signal level does not exceed the threshold. Since the configuration of the communication system according to the second embodiment can facilitate the circuit configuration of the receiving unit 18 as compared with the configuration of the communication system according to the first embodiment, the price of the ECU 1 can be reduced. Can be realized.
 なお実施の形態2においては、受信部18が2つのカウンタを用いて判定を行う構成としたが、これに限るものではなく、1つのカウンタを用いて判定を行う構成であってもよい。例えば信号レベルが閾値を超えると判定した場合にのみカウンタをカウントアップし、このカウンタの値が全サンプリング数の半分を超えるか否かを判定する構成とすることができる。また例えば、信号レベルが閾値を超えると判定した場合にカウンタをカウントアップし、信号レベルが閾値を超えないと判定した場合にカウンタをカウントダウンする構成とすることができる。また、通信線5の信号レベルと閾値との比較をCMOS回路にて行う構成としたが、これに限るものではなく、その他の回路にて比較を行う構成としてもよい。 In the second embodiment, the receiving unit 18 is configured to perform determination using two counters, but is not limited thereto, and may be configured to perform determination using one counter. For example, the counter can be counted up only when it is determined that the signal level exceeds the threshold, and it can be determined whether or not the value of the counter exceeds half of the total number of samplings. Further, for example, the counter can be counted up when it is determined that the signal level exceeds the threshold, and the counter can be counted down when it is determined that the signal level does not exceed the threshold. In addition, the comparison between the signal level of the communication line 5 and the threshold value is performed by the CMOS circuit. However, the configuration is not limited to this, and the comparison may be performed by another circuit.
(実施の形態3)
 上述の実施の形態1、2に係る通信システムでは、図5及び図8等に示したように、ドミナント送信の際に出力するパルス信号のパルス幅Tp(所定時間Tp)と、受信の際に信号レベルをサンプリングするサンプリング期間Td(所定サンプリング期間Td)とをどのような値とするかが、通信性能に与える影響が大きい。最適なパルス幅Tp及びサンプリング期間Tdは、例えば通信システム(を搭載した車輌)の工場出荷前などに、通信システムの特性を測定して最適値を算出し、各ECU1に予め設定しておく。
(Embodiment 3)
In the communication systems according to the above-described first and second embodiments, as shown in FIGS. 5 and 8, etc., the pulse width Tp (predetermined time Tp) of the pulse signal output at the time of dominant transmission, and at the time of reception The value of the sampling period Td (predetermined sampling period Td) for sampling the signal level has a great influence on the communication performance. The optimum pulse width Tp and sampling period Td are set in advance in each ECU 1 by measuring the characteristics of the communication system and calculating the optimum values before shipping the communication system (vehicle equipped with) to the factory, for example.
 しかしながら予め算出及び設定されたパルス幅Tp及びサンプリング期間Tdは、例えば車輌のオプション装備の追加/削除などによってECU1の搭載数が増加/減少した場合に通信システムの特性が変化し、最適な値でなくなる可能性がある。またECU1及び通信線5等の経年変化によっても通信特性が変化する可能性があり、予め算出及び設定されたパルス幅Tp及びサンプリング期間Tdが最適な値でなくなる可能性がある。 However, the pulse width Tp and the sampling period Td calculated and set in advance are optimal values, for example, when the number of ECUs 1 is increased / decreased due to addition / deletion of optional equipment of the vehicle, and the characteristics of the communication system change. There is a possibility of disappearing. Further, the communication characteristics may change due to the secular changes of the ECU 1 and the communication line 5 and the like, and the pulse width Tp and the sampling period Td calculated and set in advance may not be optimal values.
 実施の形態3に係る通信システムは、パルス幅Tp及びサンプリング期間Tdの自動設定機能を備えることによって、上記の問題を解決したものである。この自動設定の処理は、例えば通信システムを搭載した車輌の工場出荷前、車輌の点検を行う場合、又は、ECU1の追加/削除を行った場合等に、車輌のディーラ又は工場等にて行われる。自動設定処理を行っている間、通信システムの各ECU1は通常の通信処理を停止する。 The communication system according to Embodiment 3 solves the above problem by providing an automatic setting function of the pulse width Tp and the sampling period Td. This automatic setting process is performed at a vehicle dealer or factory, for example, when a vehicle equipped with a communication system is shipped from the factory, when the vehicle is inspected, or when the ECU 1 is added / deleted. . During the automatic setting process, each ECU 1 of the communication system stops the normal communication process.
 また実施の形態3に係る通信システムは、パルス幅Tp及びサンプリング期間Tdの自動設定処理の際に、一のECU1がマスターECUとなり、残りのECU1がスレーブECUとなって処理を進める。なお、マスターECUとしての機能は、通信システム中の1つのECU1にのみ設けられていてもよく、又は、複数のECU1に設けられて、状況に応じていずれかのECU1がマスターECUとして動作してもよい。 In the communication system according to the third embodiment, in the automatic setting process of the pulse width Tp and the sampling period Td, one ECU 1 serves as a master ECU and the remaining ECU 1 serves as a slave ECU. The function as the master ECU may be provided only in one ECU 1 in the communication system, or provided in a plurality of ECUs 1 and any one ECU 1 operates as a master ECU depending on the situation. Also good.
 以下の説明においては、図1の通信システムの構成において、ECU1aをマスターECUとし、その他のECU1b~1eをスレーブECUとする。例えばマスターECU1aには、パルス幅Tp及びサンプリング期間Tdの自動設定処理を動作させるための操作部(図示は省略する)が設けられており、車輌のディーラ又は工場等にて作業者がこの操作部に対する操作を行うことによって、自動設定処理が開始される。 In the following description, in the configuration of the communication system in FIG. 1, the ECU 1a is a master ECU, and the other ECUs 1b to 1e are slave ECUs. For example, the master ECU 1a is provided with an operation unit (not shown) for operating the automatic setting processing of the pulse width Tp and the sampling period Td, and an operator can operate the operation unit at a vehicle dealer or factory. By performing an operation on, automatic setting processing is started.
 マスターECU1aは、自動設定処理の開始命令を、通信線5を介してスレーブECU1b~1eに送信する。これを受信した各スレーブECU1b~1eは、通常の制御処理及び通信処理等を停止して、自動設定処理を開始する。なおマスターECU1aが送信する自動設定処理の開始命令は、例えばCANプロトコルに従ったデータとして送信されるものであってよく、また例えばCANプロトコルとは異なる特定信号を通信線5に出力し、この特定信号を各スレーブECU1b~1eが検知する構成であってもよい。 The master ECU 1a transmits an automatic setting process start command to the slave ECUs 1b to 1e via the communication line 5. The slave ECUs 1b to 1e that have received this stop normal control processing and communication processing, and start automatic setting processing. Note that the automatic setting process start command transmitted by the master ECU 1a may be transmitted as data conforming to the CAN protocol, for example, and a specific signal different from the CAN protocol is output to the communication line 5, for example. The slave ECUs 1b to 1e may be configured to detect the signal.
 その後、マスターECU1aは、通信線5に対して試験信号の出力を行う。図11は、自動設定処理にて出力される試験信号を説明するための模式図である。マスターECU1aは、試験信号としてドミナント及びレセシブが交互に連なった信号を出力する。図11上段に示すように、試験信号は、Tp1の信号列からTpNの信号列までのN個の信号列がデリミタで区切られた構成である。デリミタは区切りとして予め定められた信号列であり、例えば所定個のレセシブが連続した信号とすることができる。Tpn(n=1、2、…、N)の信号列は、ドミナント及びレセシブの2ビット列をM個連続した構成である。 Thereafter, the master ECU 1 a outputs a test signal to the communication line 5. FIG. 11 is a schematic diagram for explaining a test signal output in the automatic setting process. The master ECU 1a outputs a signal in which dominant and recessive are alternately connected as a test signal. As shown in the upper part of FIG. 11, the test signal has a configuration in which N signal sequences from the Tp1 signal sequence to the TpN signal sequence are separated by a delimiter. The delimiter is a signal sequence determined in advance as a delimiter. For example, the delimiter can be a signal in which a predetermined number of recessive signals are continuous. The signal sequence of Tpn (n = 1, 2,..., N) has a configuration in which M dominant and recessive 2-bit sequences are continued.
 また図11下段に示すように、Tpnの信号列は、それぞれドミナントとして出力するパルス信号のパルス幅が異なる。即ちTp1の信号列におけるドミナントのパルス幅はTp1であり、Tp2の信号列におけるドミナントのパルス幅はTp2であり、…、TpNの信号列におけるドミナントのパルス幅はTpNである。 Further, as shown in the lower part of FIG. 11, the pulse widths of the pulse signals output as dominants are different in the Tpn signal sequence. That is, the dominant pulse width in the Tp1 signal train is Tp1, the dominant pulse width in the Tp2 signal train is Tp2,..., And the dominant pulse width in the TpN signal train is TpN.
 このように、マスターECU1aは、ドミナント及びレセシブの2ビット列をL×N個含む試験信号を通信線5へ出力する。これに対してマスターECU1a及びスレーブECU1b~1e(即ち通信システムの全てのECU1a~1e)は、通信線5に出力された試験信号のサンプリングを行う。図12は、自動設定処理にて行うサンプリングを説明するための模式図である。図12上段に示すように試験信号のTpnの信号列には、ドミナントのパルス幅がTpnに設定されたドミナント及びレセシブの2ビット列がM個連続している。 Thus, the master ECU 1a outputs a test signal including L × N 2-bit strings of dominant and recessive to the communication line 5. On the other hand, the master ECU 1a and the slave ECUs 1b to 1e (that is, all the ECUs 1a to 1e in the communication system) sample the test signal output to the communication line 5. FIG. 12 is a schematic diagram for explaining the sampling performed in the automatic setting process. As shown in the upper part of FIG. 12, in the Tpn signal sequence of the test signal, there are M consecutive dominant and recessive 2-bit sequences in which the dominant pulse width is set to Tpn.
 これに対して各ECU1a~1eは、サンプリング期間Tdm(m=1、2、…、M)を変化させながら、試験信号のサンプリングを行う。各ECU1a~1eは、1つのドミナント及びレセシブの2ビット列に対して同じサンプリング期間Tdmでサンプリングを行い、次の2ビット列に対して別のサンプリング期間Tdmでサンプリングを行う。よって各ECU1a~1eは、サンプリング期間Td1、Td1、Td2、Td2、…、TdM、TdMのように、同じサンプリング期間Tdmでのサンプリングを2回ずつ行う。試験信号はドミナント及びレセシブが交互に繰り返される信号であるため、同じサンプリング期間Tdmでのサンプリングを2回行うことで、各ECU1a~1eは、ドミナント及びレセシブのサンプリングを同じサンプリング期間Tdmで行うことができる。 In contrast, each of the ECUs 1a to 1e samples the test signal while changing the sampling period Tdm (m = 1, 2,..., M). Each of the ECUs 1a to 1e samples one dominant and recessive 2-bit string in the same sampling period Tdm, and samples the next 2-bit string in another sampling period Tdm. Accordingly, each of the ECUs 1a to 1e performs sampling twice in the same sampling period Tdm, like the sampling periods Td1, Td1, Td2, Td2,..., TdM, TdM. Since the test signal is a signal in which dominant and recessive are alternately repeated, by performing sampling twice in the same sampling period Tdm, each ECU 1a to 1e can perform dominant and recessive sampling in the same sampling period Tdm. it can.
 また各ECU1a~1eは、各サンプリング期間Tdmの間に、例えば5nsなどの所定周期で通信線5の電圧値のサンプリングを繰り返し行っており、複数回のサンプリングで得られた複数個のサンプリング結果に基づいて(例えば実施の形態1ではサンプリング結果の平均値に基づいて、また例えば実施の形態2ではサンプリング結果の多数決判定に基づいて)、通信線5上の信号がドミナント又はレセシブのいずれであるかを判定している。自動設定処理において各ECU1a~1eは、各サンプリング期間Tdmの間に得られた複数のサンプリング結果から、以下の(2)式による評価値を算出する。 Each of the ECUs 1a to 1e repeatedly samples the voltage value of the communication line 5 with a predetermined period of, for example, 5 ns during each sampling period Tdm, and a plurality of sampling results obtained by a plurality of samplings are obtained. Whether the signal on the communication line 5 is dominant or recessive based on (for example, based on the average value of the sampling results in the first embodiment and based on the majority decision of the sampling results in the second embodiment). Is judged. In the automatic setting process, each of the ECUs 1a to 1e calculates an evaluation value according to the following equation (2) from a plurality of sampling results obtained during each sampling period Tdm.
 評価値 = (D0-R0)/Pd  …(2) Evaluation value = (D0-R0) / Pd (2)
 なお評価値の算出は、同じサンプリング期間Tdmで行ったドミナント及びレセシブのサンプリング結果について行う。(2)式において、D0はドミナントの信号をドミナントと判定したサンプリング結果の数であり、R0はレセシブの信号をドミナントと判定したサンプリング結果の数であり、Pdはドミナント又はレセシブの各サンプリング数である。評価値は-1から+1までの値をとり、評価値が0より大きい場合には多数決判定によりドミナント又はレセシブを正しく判定できる。 Note that the evaluation value is calculated for the dominant and recessive sampling results performed in the same sampling period Tdm. In the equation (2), D0 is the number of sampling results in which the dominant signal is determined to be dominant, R0 is the number of sampling results in which the recessive signal is determined to be dominant, and Pd is the number of samplings of dominant or recessive. is there. The evaluation value ranges from −1 to +1. If the evaluation value is greater than 0, dominant or recessive can be correctly determined by majority decision.
 試験信号の一のパルス幅Tpnの信号列に対して上記のサンプリング及び評価値の算出を行った場合、各ECU1a~1eは、M個の評価値を算出することができる。各ECU1a~1eは、最も高い評価値となったサンプリング期間Tdmを選別する。試験信号にはN通りのパルス幅Tpnの信号列が含まれているため、各ECU1a~1eは、各パルス幅Tpnに対してそれぞれ1つのサンプリング期間Tdmを選別することができ、選別したN個のサンプリング期間Tdmを、そのパルス幅Tpn及び評価値と共にRAM13に記憶する。 When the above sampling and evaluation value calculation are performed on a signal sequence having one pulse width Tpn of the test signal, each of the ECUs 1a to 1e can calculate M evaluation values. Each of the ECUs 1a to 1e selects the sampling period Tdm having the highest evaluation value. Since the test signal includes a signal sequence having N kinds of pulse widths Tpn, each ECU 1a to 1e can select one sampling period Tdm for each pulse width Tpn. The sampling period Tdm is stored in the RAM 13 together with the pulse width Tpn and the evaluation value.
 図13は、RAM13に記憶される選別結果の一例を示す模式図である。マスターECU1aによる試験信号の出力、並びに、各ECU1a~1eによる試験信号のサンプリング及び評価等が終了した後、例えばスレーブECU1bが同様の試験信号を出力し、各ECU1a~1eにて試験信号のサンプリング及び評価等を行う。このように試験信号の出力を通信システム中の全ECU1a~1eが順に行い、全ECU1a~1eが出力した全ての試験信号に対して各ECU1a~1eがサンプリング及び評価等を行う。例えば通信システム中のECUの搭載数がL個の場合、RAM13には選別されたL×N個のサンプリング期間Tdmが記憶される。 FIG. 13 is a schematic diagram showing an example of the sorting result stored in the RAM 13. After the output of the test signal by the master ECU 1a and the sampling and evaluation of the test signal by the ECUs 1a to 1e are completed, for example, the slave ECU 1b outputs the same test signal, and the ECU 1a to 1e Evaluate etc. In this way, all ECUs 1a to 1e in the communication system sequentially output test signals, and each ECU 1a to 1e performs sampling, evaluation, and the like on all the test signals output from all ECUs 1a to 1e. For example, when the number of ECUs mounted in the communication system is L, the selected L × N sampling periods Tdm are stored in the RAM 13.
 なおECU1a~1eによる試験信号の出力順は、どのような順番であってもよい。上記の説明では、初めにマスターECU1aが試験信号を出力するものとしたが、必ずしもマスターECU1aから試験信号の出力を開始する必要はない。試験信号の出力は、例えばECU1a~1e毎に予め定められた順番に従って行う構成であってもよく、また例えば各ECU1a~1eがランダムに試験信号の出力を行う構成であってもよい。ランダムに試験信号を出力する構成では、複数のECU1a~1eが同時的に試験信号を出力した場合、例えば試験信号の出力を停止してランダムな待ち時間の経過後に再出力を行えばよい。 Note that the output order of the test signals by the ECUs 1a to 1e may be any order. In the above description, the master ECU 1a first outputs the test signal, but it is not always necessary to start outputting the test signal from the master ECU 1a. For example, the test signals may be output according to a predetermined order for each of the ECUs 1a to 1e. For example, the ECUs 1a to 1e may output the test signals at random. In the configuration in which the test signals are output at random, when the plurality of ECUs 1a to 1e output the test signals simultaneously, for example, the output of the test signals may be stopped and the output may be performed again after a random waiting time has elapsed.
 全てのECU1a~1eによる試験信号の出力が終了した後、マスターECU1aは、スレーブECU1b~1eに対して、RAM13に記憶した情報の送信を順に要求する。この要求に応じてスレーブECU1b~1eは、RAM13に記憶した情報を読み出してマスターECU1aへ送信する。マスターECU1aは、全てのスレーブECU1b~1eからの情報を受信し、RAM13に記憶する。これによりマスターECU1aのRAM13には、自身が作成した情報を含めて、L×L×N個のサンプリング期間及び評価値等の情報が記憶される。 After the output of test signals by all the ECUs 1a to 1e is completed, the master ECU 1a sequentially requests the slave ECUs 1b to 1e to transmit the information stored in the RAM 13. In response to this request, the slave ECUs 1b to 1e read out the information stored in the RAM 13 and transmit it to the master ECU 1a. The master ECU 1a receives information from all the slave ECUs 1b to 1e and stores it in the RAM 13. As a result, the RAM 13 of the master ECU 1a stores information such as L × L × N sampling periods and evaluation values including information created by itself.
 次いでマスターECU1aは、RAM13に記憶した情報に基づいて、以後の通信で用いるパルス幅を決定する。マスターECU1aは、L×L×N個の情報に含まれる評価値に基づいて、N個のパルス幅Tpnから一のパルス幅を選択するが、選択方法はどのような方法であってもよい。例えばマスターECU1aは、L×L×N個の情報について、まず評価値が閾値以下のパルス幅Tpnを選択対象から除外し、各パルス幅Tpnの評価値の平均が最も大きいパルス幅Tpnを選択することができる。マスターECU1aは、選択した一のパルス幅Tpnを、スレーブECU1b~1eへブロードキャストなどにより通知する。 Next, the master ECU 1a determines the pulse width used in the subsequent communication based on the information stored in the RAM 13. The master ECU 1a selects one pulse width from the N pulse widths Tpn based on the evaluation values included in the L × L × N pieces of information, but any selection method may be used. For example, for the L × L × N pieces of information, the master ECU 1a first excludes the pulse width Tpn whose evaluation value is equal to or less than the threshold from the selection target, and selects the pulse width Tpn having the largest average evaluation value of each pulse width Tpn. be able to. The master ECU 1a notifies the selected one pulse width Tpn to the slave ECUs 1b to 1e by broadcast or the like.
 マスターECU1aからパルス幅Tpnが通知された各スレーブECU1b~1eは、RAM13に記憶した情報(図13参照)に基づいて、このパルス幅Tpnに適したサンプリング期間Tdmを決定する。RAM13に記憶された情報には、通知されたパルス幅Tpnに対応するサンプリング期間Tdm及び評価値の情報がL個記憶されており、スレーブECU1b~1eは、これらの中から1つのサンプリング期間Tdmを選択する。但し選択方法はどのような方法であってもよい。例えばスレーブECU1b~1eは、L個の情報について、まず評価値が閾値以下のサンプリング期間Tdmを選択対象から除外し、最も評価値が大きいサンプリング期間Tdmを選択することができる。なおマスターECU1aも同様に、自らが決定したパルス幅Tpnに対するサンプリング期間Tdmの決定を、RAM13に記憶された情報の内の自らが作成した情報に基づいて行う。 Each of the slave ECUs 1b to 1e notified of the pulse width Tpn from the master ECU 1a determines a sampling period Tdm suitable for the pulse width Tpn based on the information stored in the RAM 13 (see FIG. 13). The information stored in the RAM 13 stores L pieces of sampling period Tdm and evaluation value information corresponding to the notified pulse width Tpn, and the slave ECUs 1b to 1e select one sampling period Tdm from these. select. However, any selection method may be used. For example, for the L pieces of information, the slave ECUs 1b to 1e can first exclude the sampling period Tdm whose evaluation value is equal to or less than the threshold from the selection target and select the sampling period Tdm having the largest evaluation value. Similarly, the master ECU 1a determines the sampling period Tdm with respect to the pulse width Tpn determined by itself based on the information created by itself among the information stored in the RAM 13.
 次いで各ECU1a~1eは、マスターECU1aが決定したパルス幅Tpnと、各自が決定したサンプリング期間Tdmとを、例えばCAN通信制御部16内に設けられた設定値を記憶するための不揮発性メモリなどに記憶し、通信パラメータを更新する。その後、各ECU1a~1eによる通信は、新たに設定されたパルス幅及びサンプリング期間を用いて行われる。即ち、各ECU1a~1eは、マスターECU1aにて決定された共通のパルス幅にてドミナントの送信処理を行う。また各ECU1a~1eは、自らが決定したサンプリング期間にて受信処理を行う。各ECU1a~1eのサンプリング期間は、それぞれ異なるものであってよい。 Next, the ECUs 1a to 1e store the pulse width Tpn determined by the master ECU 1a and the sampling period Tdm determined by the ECU 1a in a non-volatile memory for storing a set value provided in the CAN communication control unit 16, for example. Store and update communication parameters. Thereafter, communication by each of the ECUs 1a to 1e is performed using a newly set pulse width and sampling period. That is, the ECUs 1a to 1e perform dominant transmission processing with a common pulse width determined by the master ECU 1a. Each of the ECUs 1a to 1e performs reception processing in a sampling period determined by itself. The sampling periods of the ECUs 1a to 1e may be different.
 図14は、マスターECU1aが行う自動設定処理の手順を示すフローチャートである。マスターECU1aは、まず、自動設定処理の開始命令を通信システム中の全スレーブECU1b~1eへ送信する(ステップS61)。次いでマスターECU1aは、試験信号の送信処理を行うと共に(ステップS62)、試験信号の受信処理を行う(ステップS63)。なおステップS62の試験信号送信処理及びステップS63の試験信号受信処理は並列的に行われる。またステップS62及びS63の処理の詳細な手順は後述する。 FIG. 14 is a flowchart showing a procedure of automatic setting processing performed by the master ECU 1a. First, the master ECU 1a transmits an automatic setting process start command to all the slave ECUs 1b to 1e in the communication system (step S61). Next, the master ECU 1a performs a test signal transmission process (step S62) and a test signal reception process (step S63). The test signal transmission process in step S62 and the test signal reception process in step S63 are performed in parallel. The detailed procedure of steps S62 and S63 will be described later.
 試験信号受信処理により得られるサンプリング期間及び評価値等の情報に基づいて、マスターECU1aは、パルス幅に対して適したサンプリング期間を選別し(ステップS64)、選別結果をRAM13に記憶する(ステップS65)。次いでマスターECU1aは、通信システムの全ECU1a~1eが試験信号の送信を終了したか否かを判定する(ステップS66)。全ECU1a~1eが試験信号の送信を終了していない場合(S66:NO)、マスターECU1aは、ステップS63へ処理を戻し、スレーブECU1b~1eの試験信号の送信に対して、試験信号受信処理及びサンプリング期間の選別等を行う(なおこの際には、マスターECU1aは試験信号送信処理を行わない。)。 Based on information such as a sampling period and an evaluation value obtained by the test signal reception process, the master ECU 1a selects a sampling period suitable for the pulse width (step S64), and stores the selection result in the RAM 13 (step S65). ). Next, the master ECU 1a determines whether or not all the ECUs 1a to 1e of the communication system have finished transmitting test signals (step S66). If all the ECUs 1a to 1e have not finished transmitting the test signals (S66: NO), the master ECU 1a returns the process to step S63, and the test signal receiving process and the test signals for the slave ECUs 1b to 1e are transmitted. The sampling period is selected (in this case, the master ECU 1a does not perform the test signal transmission process).
 全ECU1a~1eが試験信号の送信を終了した場合(S66:YES)、マスターECU1aは、スレーブECU1b~1eのいずれかへ、サンプリング期間の選別結果の送信要求を与え(ステップS67)、これに応じてスレーブECU1b~1eから送信される選別結果を受信し(ステップS68)、受信した選別結果をRAM13に記憶する(ステップS69)。マスターECU1aは、全ECU1a~1eの選別結果をRAM13に記憶したか否かを判定し(ステップS70)、全ECU1a~1eの選別結果を記憶していない場合(S70:NO)、ステップS67へ処理を戻し、別のスレーブECU1b~1eに対する送信要求を行う。 When all the ECUs 1a to 1e have finished transmitting the test signals (S66: YES), the master ECU 1a gives a request for transmitting the selection result of the sampling period to one of the slave ECUs 1b to 1e (step S67). The selection results transmitted from the slave ECUs 1b to 1e are received (step S68), and the received selection results are stored in the RAM 13 (step S69). The master ECU 1a determines whether or not the selection results of all the ECUs 1a to 1e are stored in the RAM 13 (step S70). If the selection results of all the ECUs 1a to 1e are not stored (S70: NO), the process proceeds to step S67. And sends a transmission request to another slave ECU 1b to 1e.
 全ECU1a~1eの選別結果を記憶した場合(S70:YES)、マスターECU1aは、RAM13に記憶した情報の評価値に基づいて、一のパルス幅を決定し(ステップS71)、決定したパルス幅を全てのスレーブECU1b~1eへ通知する(ステップS72)。次いでマスターECU1aは、RAM13に記憶した情報に基づいて、ステップS71にて決定したパルス幅に適したサンプリング期間を決定する(ステップS73)。マスターECU1aは、ステップS71にて決定したパルス幅及びステップS73にて決定したサンプリング期間を、例えばCAN通信制御部16内のメモリなどに記憶することで設定を更新し(ステップS74)、処理を終了する。 When the selection results of all the ECUs 1a to 1e are stored (S70: YES), the master ECU 1a determines one pulse width based on the evaluation value of the information stored in the RAM 13 (step S71), and determines the determined pulse width. All the slave ECUs 1b to 1e are notified (step S72). Next, the master ECU 1a determines a sampling period suitable for the pulse width determined in step S71 based on the information stored in the RAM 13 (step S73). The master ECU 1a updates the setting by storing the pulse width determined in step S71 and the sampling period determined in step S73 in, for example, a memory in the CAN communication control unit 16 (step S74), and ends the process. To do.
 図15は、スレーブECU1b~1eが行う自動設定処理の手順を示すフローチャートである。スレーブECU1b~1eは、マスターECU1aからの自動設定処理の開始命令を受信したか否かを判定し(ステップS81)、開始命令を受信していない場合には(S81:NO)、開始命令を受信するまで待機する。 FIG. 15 is a flowchart showing a procedure of automatic setting processing performed by the slave ECUs 1b to 1e. The slave ECUs 1b to 1e determine whether or not an automatic setting process start command is received from the master ECU 1a (step S81). If no start command is received (S81: NO), the slave ECU 1b-1e receives the start command. Wait until
 開始命令を受信した場合(S81:YES)、スレーブECU1b~1eは、自らの送信順であるか否かを判定する(ステップS82)。スレーブECU1b~1eは、自らの送信順である場合(S82:YES)、試験信号の送信処理を行い(ステップS83)、自らの送信順でない場合(S82:NO)、試験信号の送信処理を行わない。また、スレーブECU1b~1eは、試験信号の受信処理を行う(ステップS84)。なおステップS83の試験信号送信処理をスレーブECU1b~1eが行う場合、この試験信号送信処理とステップS84の試験信号受信処理とは並列的に行われる。 When the start command is received (S81: YES), the slave ECUs 1b to 1e determine whether or not the transmission order is their own (step S82). When the slave ECUs 1b to 1e are in their own transmission order (S82: YES), the slave ECUs 1b to 1e perform a test signal transmission process (step S83), and when they are not in their own transmission order (S82: NO), perform the test signal transmission process. Absent. The slave ECUs 1b to 1e perform a test signal reception process (step S84). When the slave ECUs 1b to 1e perform the test signal transmission process in step S83, the test signal transmission process and the test signal reception process in step S84 are performed in parallel.
 試験信号受信処理により得られるサンプリング期間及び評価値等の情報に基づいて、スレーブECU1b~1eは、パルス幅に対して適したサンプリング期間を選別し(ステップS85)、選別結果をRAM13に記憶する(ステップS86)。次いでスレーブECU1b~1eは、通信システムの全ECU1a~1eが試験信号の送信を終了したか否かを判定する(ステップS87)。全ECU1a~1eが試験信号の送信を終了していない場合(S87:NO)、スレーブECU1b~1eは、ステップS82へ処理を戻し、上記の処理を繰り返し行う。 Based on information such as the sampling period and the evaluation value obtained by the test signal reception process, the slave ECUs 1b to 1e select a sampling period suitable for the pulse width (step S85), and store the selection result in the RAM 13 (step S85). Step S86). Next, the slave ECUs 1b to 1e determine whether or not all the ECUs 1a to 1e of the communication system have finished transmitting the test signals (step S87). If all the ECUs 1a to 1e have not finished transmitting the test signals (S87: NO), the slave ECUs 1b to 1e return the process to step S82 and repeat the above process.
 全ECU1a~1eが試験信号の送信を終了した場合(S87:YES)、スレーブECU1b~1eは、マスターECU1aからの選別結果の送信要求を受信したか否かを判定する(ステップS88)。選別結果の送信要求を受信していない場合(S88:NO)、スレーブECU1b~1eは、送信要求を受信するまで待機する。選別結果の送信要求を受信した場合(S88:YES)、スレーブECU1b~1eは、RAM13に記憶した選別結果をマスターECU1aへ送信する(ステップS89)。 When all the ECUs 1a to 1e have finished transmitting the test signals (S87: YES), the slave ECUs 1b to 1e determine whether or not a selection result transmission request from the master ECU 1a has been received (step S88). When the transmission request for the sorting result has not been received (S88: NO), the slave ECUs 1b to 1e stand by until the transmission request is received. When the selection result transmission request is received (S88: YES), the slave ECUs 1b to 1e transmit the selection result stored in the RAM 13 to the master ECU 1a (step S89).
 次いでスレーブECU1b~1eは、マスターECU1aにより決定されて通知されるパルス幅を受信したか否かを判定する(ステップS90)。マスターECU1aからパルス幅を受信していない場合(S90:NO)、スレーブECU1b~1eは、パルス幅を受信するまで待機する。パルス幅を受信した場合(S90:YES)、スレーブECU1b~1eは、RAM13に記憶した情報に基づいて、ステップS90にて受信したパルス幅に適したサンプリング期間を決定する(ステップS91)。スレーブECU1b~1eは、ステップS90にて受信したパルス幅及びステップS91にて決定したサンプリング期間を、例えばCAN通信制御部16内のメモリなどに記憶することで設定を更新し(ステップS92)、処理を終了する。 Next, the slave ECUs 1b to 1e determine whether or not the pulse width determined and notified by the master ECU 1a has been received (step S90). When the pulse width is not received from the master ECU 1a (S90: NO), the slave ECUs 1b to 1e stand by until the pulse width is received. When the pulse width is received (S90: YES), the slave ECUs 1b to 1e determine a sampling period suitable for the pulse width received in step S90 based on the information stored in the RAM 13 (step S91). The slave ECUs 1b to 1e update the settings by storing the pulse width received in step S90 and the sampling period determined in step S91 in, for example, a memory in the CAN communication control unit 16 (step S92), and processing Exit.
 図16は、試験信号送信処理の手順を示すフローチャートであり、図14に示すフローチャートのステップS62及び図15に示すフローチャートのステップS83にてECU1(マスターECU1a又はスレーブECU1b~1e)が行う処理である。また図示のフローチャートでは、処理のループ数をカウントするための変数i、jを用いるが、これらの変数はECU1の制御部11内のレジスタ又はRAM13等の記憶領域に確保される。また定数Nは試験信号中のパルス幅の種類数であり、定数Mは試験信号中の一のパルス幅に関して出力するドミナント及びレセシブの2ビット列連続数である。 FIG. 16 is a flowchart showing the procedure of the test signal transmission process, which is a process performed by the ECU 1 (master ECU 1a or slave ECUs 1b to 1e) in step S62 of the flowchart shown in FIG. 14 and step S83 of the flowchart shown in FIG. . In the illustrated flowchart, variables i and j for counting the number of processing loops are used. These variables are secured in a storage area such as a register in the control unit 11 of the ECU 1 or the RAM 13. The constant N is the number of types of pulse widths in the test signal, and the constant M is the number of consecutive 2-bit strings of dominant and recessive output for one pulse width in the test signal.
 試験信号送信処理において、まずECU1は、変数i、jの値を1に初期化する(ステップS101)。次いでECU1は、パルス幅をi番目のパルス幅Tpiに設定し(ステップS102)、このパルス幅にてドミナントを出力し(ステップS103)、レセシブを出力し(ステップS104)、変数jの値に1を加算する(ステップS105)。ECU1は、変数jの値が定数Mを超えたか否かを判定し(ステップS106)、変数jの値が定数Mを超えていない場合(S106:NO)、ステップS103へ処理を戻し、ドミナント及びレセシブの出力を繰り返し行う。 In the test signal transmission process, first, the ECU 1 initializes the values of the variables i and j to 1 (step S101). Next, the ECU 1 sets the pulse width to the i-th pulse width Tpi (step S102), outputs a dominant with this pulse width (step S103), outputs recessive (step S104), and sets the value of the variable j to 1. Are added (step S105). The ECU 1 determines whether or not the value of the variable j exceeds the constant M (step S106). If the value of the variable j does not exceed the constant M (S106: NO), the process returns to step S103, and the dominant and Repeat the recessive output.
 変数jの値が定数Mを超えた場合(S106:YES)、ECU1は、変数jの値を1に初期化すると共に(ステップS107)、変数iの値に1を加算する(ステップS108)。次いでECU1は、変数iの値が定数Nを超えたか否かを判定する(ステップS109)。変数iの値が定数Nを超えていない場合(S109:NO)、ECU1は、デリミタを出力して(ステップS110)、ステップS102へ処理を戻し、次のパルス幅での信号出力を繰り返し行う。変数iの値が定数Nを超えた場合(S109:YES)、ECU1は、試験信号送信処理を終了する。 When the value of the variable j exceeds the constant M (S106: YES), the ECU 1 initializes the value of the variable j to 1 (step S107) and adds 1 to the value of the variable i (step S108). Next, the ECU 1 determines whether or not the value of the variable i exceeds a constant N (step S109). When the value of the variable i does not exceed the constant N (S109: NO), the ECU 1 outputs a delimiter (step S110), returns the process to step S102, and repeats signal output with the next pulse width. When the value of the variable i exceeds the constant N (S109: YES), the ECU 1 ends the test signal transmission process.
 図17は、試験信号受信処理の手順を示すフローチャートであり、図14に示すフローチャートのステップS63及び図15に示すフローチャートのステップS84にてECU1(マスターECU1a又はスレーブECU1b~1e)が行う処理である。また変数i、j及び定数M、Nについては、図16に示したフローチャートと同様である。 FIG. 17 is a flowchart showing the procedure of the test signal reception process, and is a process performed by the ECU 1 (master ECU 1a or slave ECUs 1b to 1e) in step S63 of the flowchart shown in FIG. 14 and step S84 of the flowchart shown in FIG. . The variables i and j and the constants M and N are the same as those in the flowchart shown in FIG.
 試験信号受信処理において、まずECU1は、変数i、jの値を1に初期化する(ステップS121)。次いでECU1は、サンプリング期間をj番目のサンプリング期間Tdjに設定し(ステップS122)、このサンプリング期間にてドミナントのサンプリングを行い(ステップS123)、レセシブのサンプリングを行う(ステップS124)。ECU1は、ステップS123及びS124のサンプリング結果を基に、(2)式による評価値を算出して、RAM13に記憶する(ステップS125)。次いでECU1は、変数jの値に1を加算し(ステップS126)、変数jの値が定数Mを超えたか否かを判定する(ステップS127)。変数jの値が定数Mを超えていない場合(S127:NO)、ECU1は、ステップS122へ処理を戻し、次のサンプリング期間にてサンプリングを繰り返し行う。 In the test signal reception process, first, the ECU 1 initializes the values of the variables i and j to 1 (step S121). Next, the ECU 1 sets the sampling period to the j-th sampling period Tdj (step S122), performs dominant sampling in this sampling period (step S123), and performs recessive sampling (step S124). The ECU 1 calculates an evaluation value based on the expression (2) based on the sampling results of steps S123 and S124, and stores it in the RAM 13 (step S125). Next, the ECU 1 adds 1 to the value of the variable j (step S126), and determines whether or not the value of the variable j exceeds the constant M (step S127). When the value of the variable j does not exceed the constant M (S127: NO), the ECU 1 returns the process to step S122 and repeats sampling in the next sampling period.
 変数jの値が定数Mを超えた場合(S127:YES)、ECU1は、変数jの値を1に初期化すると共に(ステップS128)、変数iの値に1を加算する(ステップS129)。次いでECU1は、変数iの値が定数Nを超えたか否かを判定する(ステップS130)。変数iの値が定数Nを超えていない場合(S130:NO)、ECU1は、デリミタを受信した後(ステップS131)、ステップS122へ処理を戻し、上記の処理を繰り返し行う。変数iの値が定数Nを超えた場合(S130:YES)、ECU1は、試験信号受信処理を終了する。 When the value of the variable j exceeds the constant M (S127: YES), the ECU 1 initializes the value of the variable j to 1 (step S128) and adds 1 to the value of the variable i (step S129). Next, the ECU 1 determines whether or not the value of the variable i exceeds a constant N (step S130). When the value of the variable i does not exceed the constant N (S130: NO), after receiving the delimiter (step S131), the ECU 1 returns the process to step S122 and repeats the above process. When the value of the variable i exceeds the constant N (S130: YES), the ECU 1 ends the test signal reception process.
 以上の構成の実施の形態3に係る通信システムは、通信処理を行うために必要なパルス幅及びサンプリング期間の設定を自動的に行う機能を備える。これによりECU1の搭載数が増減した場合又は経年変化が発生した場合等であっても、例えばECU1の搭載数を増減したとき又は通信システムのメンテナンス時等に自動設定を行うことによって、変化した通信特性に適した通信パラメータでの通信を行うことができる。よって通信システムは、高品質且つ高速な通信を維持することができる。 The communication system according to Embodiment 3 configured as described above has a function of automatically setting a pulse width and a sampling period necessary for performing communication processing. As a result, even when the number of ECUs 1 is increased or decreased, or when a secular change occurs, for example, when the number of ECUs 1 is increased or decreased or when maintenance is performed on the communication system, the changed communication is performed. Communication can be performed with communication parameters suitable for the characteristics. Therefore, the communication system can maintain high-quality and high-speed communication.
 通信パラメータの自動設定の際に、一のECU1が試験信号を順に送信し、全てのECU1がこれを受信する処理を行う。試験信号の送信はドミナントのパルス幅を変化させながら行い、且つ、試験信号の受信はサンプリング期間を変化させながら行う。これによりパルス幅及びサンプリング期間の複数の組み合わせに対して送受信の結果を評価することができ、これらの評価結果から通信システムの通信特性に適したパルス幅及びサンプリング期間を決定することができる。 When automatically setting communication parameters, one ECU 1 transmits test signals in order, and all ECUs 1 perform processing to receive the test signals. The test signal is transmitted while changing the dominant pulse width, and the test signal is received while changing the sampling period. Thereby, the transmission / reception results can be evaluated for a plurality of combinations of the pulse width and the sampling period, and the pulse width and the sampling period suitable for the communication characteristics of the communication system can be determined from these evaluation results.
 またスレーブECU1b~1eの評価結果をマスターECU1aに集約し、マスターECU1aが全ての評価結果に基づいてパルス幅を決定して各スレーブECU1b~1eへ通知する。これにより全てのECU1が共通のパルス幅にて以後の通信を行うことができる。またマスターECU1aが決定したパルス幅と、自らの評価結果とに応じて、各ECU1がサンプリング期間を決定する。これにより各ECU1に適したサンプリング期間を決定することができる。 Also, the evaluation results of the slave ECUs 1b to 1e are collected in the master ECU 1a, and the master ECU 1a determines the pulse width based on all the evaluation results and notifies each slave ECU 1b to 1e. As a result, all ECUs 1 can perform subsequent communication with a common pulse width. Further, each ECU 1 determines the sampling period according to the pulse width determined by the master ECU 1a and its own evaluation result. Thereby, the sampling period suitable for each ECU 1 can be determined.
 なお本実施の形態においては、(2)式に基づく評価値を算出してパルス幅及びサンプリング期間を決定する構成としたが、これに限るものではなく、その他の算出式に基づいて評価値を算出してもよい。またパルス幅及びサンプリング期間を決定する上記の処理を、各ECU1の制御部11が行う構成としたが、これに限るものではなく、CAN通信制御部16が行ってもよい。 In the present embodiment, the evaluation value based on the expression (2) is calculated to determine the pulse width and the sampling period. However, the present invention is not limited to this, and the evaluation value is calculated based on other calculation expressions. It may be calculated. In addition, the above processing for determining the pulse width and the sampling period is performed by the control unit 11 of each ECU 1, but the present invention is not limited to this, and the CAN communication control unit 16 may perform the processing.
(実施の形態4)
 実施の形態4に係る通信システムは、各ECU1がドミナントとして出力する信号が、上述の実施の形態1~3に係る通信システムのものと若干異なる。実施の形態4のECU1の送信部17は、複数ビットで構成された送信データの各ビットについて順に処理を行い、処理対象ビットの値がドミナントの場合には、第1の所定時間Tpに亘って第1信号レベルの信号を出力した後、第2の所定時間Thに亘って第2信号レベル(<第1信号レベル)の信号を出力する。また送信部17は、処理対象ビットの値がレセシブの場合、端子をハイインピーダンス状態とする。
(Embodiment 4)
The communication system according to the fourth embodiment is slightly different from that of the communication system according to the first to third embodiments described above, with respect to the signal that each ECU 1 outputs as a dominant. The transmission unit 17 of the ECU 1 according to the fourth embodiment sequentially processes each bit of transmission data composed of a plurality of bits. When the value of the processing target bit is dominant, the transmission unit 17 performs the first predetermined time Tp. After outputting the signal of the first signal level, the signal of the second signal level (<first signal level) is output for the second predetermined time Th. In addition, when the value of the processing target bit is recessive, the transmission unit 17 sets the terminal in a high impedance state.
 図18は、実施の形態4に係る通信システムにおいて各ECU1が送受信する信号を説明するための模式図であり、縦軸を信号線5のツイスト線間の電位差Vとし、横軸を時間tとしたグラフである。図示の例は、送信データがドミナントからレセシブへ変化した場合の信号である。ECU1の送信部17は、ドミナントのデータ送信を行う場合、1ビットの送信時間Tbのうち開始時点から第1の所定時間Tpまでの期間に、第1信号レベル(V1)の信号を出力した後、第2の所定時間Thに亘って第2信号レベル(0V)の信号を出力する。なお、Tp+Th≦Tbであればよく、Tp+Th<Tbの場合には、第2の所定時間Thの経過後から1ビットの送信時間Tbに達するまで、送信部17は信号を出力せずに端子をハイインピーダンス状態とする。また送信部17は、レセシブのデータ送信を行う場合、1ビットの送信時間Tbの全てについて信号を出力せずに端子をハイインピーダンス状態とする。 FIG. 18 is a schematic diagram for explaining signals transmitted and received by each ECU 1 in the communication system according to the fourth embodiment. The vertical axis represents the potential difference V between the twist lines of the signal line 5, and the horizontal axis represents time t. It is a graph. The illustrated example is a signal when transmission data changes from dominant to recessive. When transmitting the dominant data, the transmission unit 17 of the ECU 1 outputs a signal of the first signal level (V1) in the period from the start time to the first predetermined time Tp in the 1-bit transmission time Tb. The signal of the second signal level (0 V) is output over the second predetermined time Th. Note that Tp + Th ≦ Tb may be satisfied. When Tp + Th <Tb, the transmission unit 17 does not output a signal until the 1-bit transmission time Tb is reached after the second predetermined time Th has elapsed. Set to high impedance state. Further, in the case of performing recessive data transmission, the transmission unit 17 sets a terminal in a high impedance state without outputting a signal for the entire transmission time Tb of 1 bit.
 ECU1の受信部18は、各ビットの送信時間Tbのうち開始時点から第1の所定時間Tpに亘って、通信線5の信号レベルを所定周期でサンプリングしている。受信部18は、第1の所定時間Tpに亘るサンプリング結果から信号レベルの平均値を算出し、算出した平均値が予め定められた閾値を超えるか否かに応じて、ドミナント/レセシブの判定を行う。 The reception unit 18 of the ECU 1 samples the signal level of the communication line 5 at a predetermined cycle over a first predetermined time Tp from the start time in the transmission time Tb of each bit. The receiving unit 18 calculates the average value of the signal level from the sampling result over the first predetermined time Tp, and determines the dominant / recessive depending on whether the calculated average value exceeds a predetermined threshold value. Do.
 また、CAN通信制御部16は、通信を行う際に通信線5のインピーダンスマッチングを動的に行う機能を有している。図19は、実施の形態4のCAN通信制御部16によるインピーダンスマッチングを説明するための模式図であり、CAN通信制御部16内の回路を模式的に示してある。CAN通信制御部16は、ツイスト線が接続される2つの端子16aを有している。CAN通信制御部16内には、例えば回路基板上などに、2つの端子16aに接続される2つの内部配線が敷設されている。 Further, the CAN communication control unit 16 has a function of dynamically performing impedance matching of the communication line 5 when performing communication. FIG. 19 is a schematic diagram for explaining impedance matching by the CAN communication control unit 16 according to the fourth embodiment, and a circuit in the CAN communication control unit 16 is schematically shown. The CAN communication control unit 16 has two terminals 16a to which twist lines are connected. In the CAN communication control unit 16, for example, two internal wirings connected to the two terminals 16a are laid on a circuit board or the like.
 この2つの内部配線は、送信部17の出力差動アンプの2つの出力端子、及び、受信部18の入力差動アンプの2つの入力端子にそれぞれ接続されている。また各内部配線は、スイッチSWを介して抵抗器Rの一端に接続され、抵抗器Rの他端は接地電位に接続されている。各抵抗器Rの抵抗値は、例えば60Ωに設定される(この抵抗値は、CANプロトコルにて伝送路の終端抵抗値として規定される120Ωの半分の値である)。2つの内部配線に接続される2つのスイッチSWを有する切替部19は、CAN通信制御部16内の制御回路(図示は省略する)などが出力する制御信号に応じて、2つのスイッチSWのオン/オフ(接続/遮断)を同時的に切り替える。 The two internal wirings are respectively connected to two output terminals of the output differential amplifier of the transmission unit 17 and two input terminals of the input differential amplifier of the reception unit 18. Each internal wiring is connected to one end of a resistor R via a switch SW, and the other end of the resistor R is connected to a ground potential. The resistance value of each resistor R is set to 60Ω, for example (this resistance value is a half value of 120Ω defined as the termination resistance value of the transmission line by the CAN protocol). The switching unit 19 having two switches SW connected to two internal wirings turns on the two switches SW according to a control signal output from a control circuit (not shown) in the CAN communication control unit 16. / Switch off (connect / block) simultaneously.
 CAN通信制御部16は、図18に示した1ビットの送信時間Tbのうち、各ビットの送信開始から第1の所定時間Tpが経過するまでの期間、切替部19の2つのスイッチSWをオフして抵抗器Rを内部配線から切り離す。CAN通信制御部16は、第1の所定時間Tpの終了後から1ビットの送信時間Tbが終了するまでの期間、切替部19の2つのスイッチSWをオンして抵抗器Rを内部配線に接続する。なおCAN通信制御部16による抵抗器Rの接続/遮断は、送信データがドミナント/レセシブのいずれであっても同じタイミングで行われ、データを送信しない場合(受信動作のみの場合)にも同じタイミングで行われる。また通信システム中の全てのECU1のCAN通信制御部16にて同様の処理が行われており、これによって動的なインピーダンスマッチングが実現される。 The CAN communication control unit 16 turns off the two switches SW of the switching unit 19 during the period from the start of transmission of each bit until the first predetermined time Tp elapses in the 1-bit transmission time Tb shown in FIG. The resistor R is disconnected from the internal wiring. The CAN communication control unit 16 turns on the two switches SW of the switching unit 19 and connects the resistor R to the internal wiring after the first predetermined time Tp ends until the 1-bit transmission time Tb ends. To do. The connection / disconnection of the resistor R by the CAN communication control unit 16 is performed at the same timing regardless of whether the transmission data is dominant / recessive, and is the same timing when data is not transmitted (only reception operation). Done in In addition, the same processing is performed in the CAN communication control unit 16 of all ECUs 1 in the communication system, thereby realizing dynamic impedance matching.
 図20は、データ送信に係る第1の所定時間Tp及び第2の所定時間Thについて説明するための模式図であり、図1に示した通信システムに含まれる2つのECU1b、1c及びこれらを接続する通信線5(幹線5a及び支線5b、5c)を抜き出したものである。リンギングは、一のECU1が出力した信号が他のECU1にて反射されることにより生じるため、一のECU1に対して最も隣接した(信号の伝搬距離が最も短い)他のECU1がリンギングの発生に与える影響が大きい。ここでは、図1に示した通信システムにおいて2つのECU1b及び1cが最も隣接している(即ち、通信システム中でECU1b及び1c間の距離が最も短い)ものとする。 FIG. 20 is a schematic diagram for explaining the first predetermined time Tp and the second predetermined time Th related to data transmission. The two ECUs 1b and 1c included in the communication system shown in FIG. The communication line 5 (the trunk line 5a and the branch lines 5b and 5c) is extracted. Since ringing occurs when a signal output from one ECU 1 is reflected by another ECU 1, the other ECU 1 that is closest to one ECU 1 (with the shortest signal propagation distance) causes the ringing to occur. The impact is great. Here, it is assumed that the two ECUs 1b and 1c are closest to each other in the communication system shown in FIG. 1 (that is, the distance between the ECUs 1b and 1c is the shortest in the communication system).
 通信線5の幹線5aから分岐する支線5b、5cの長さをLSとし、幹線5aから分岐する支線5b、5cの分岐点間の長さをLPとした場合、2つのECU1b、1c間の距離Lは、
  L=2×LS+LP
である。よって、例えばECU1bから出力された信号がECU1cにて反射されてECU1bへ戻るまでの時間Tは、通信線5の単位長さ当たりの信号の伝達時間(通信線5の伝達速度)をAとした場合、
  T=2×L×A
である。なお単位長さ当たりの伝達時間Aは、例えばCANプロトコルにおいて5n秒/mと規定されている。
When the length of the branch lines 5b and 5c branched from the trunk line 5a of the communication line 5 is LS and the length between the branch points of the branch lines 5b and 5c branched from the trunk line 5a is LP, the distance between the two ECUs 1b and 1c L is
L = 2 × LS + LP
It is. Thus, for example, the time T from when the signal output from the ECU 1b is reflected by the ECU 1c to return to the ECU 1b is A as the transmission time of the signal per unit length of the communication line 5 (the transmission speed of the communication line 5). If
T = 2 × L × A
It is. The transmission time A per unit length is defined as 5 nsec / m in the CAN protocol, for example.
 よって、第2の所定時間Thを上記の伝達時間T以上とすることによって、第2の所定時間Thの間に0Vの信号出力とインピーダンスマッチングとが行われるため、リンギングを抑制することができる。即ち、第2の所定時間Thは、
  Th≧2×L×A
の条件を満たす必要がある。また上述のように、第1の所定時間Tp及び第2の所定時間Thは、
  Tp+Th≦Tb
の条件を満たす必要がある。
Therefore, by setting the second predetermined time Th to be equal to or longer than the transmission time T, the 0V signal output and impedance matching are performed during the second predetermined time Th, so that ringing can be suppressed. That is, the second predetermined time Th is
Th ≧ 2 × L × A
It is necessary to satisfy the conditions. As described above, the first predetermined time Tp and the second predetermined time Th are
Tp + Th ≦ Tb
It is necessary to satisfy the conditions.
 図21及び図22は、実施の形態4のCAN通信制御部16による送信処理の手順を示すフローチャートである。CAN通信制御部16は、送信すべきデータの中から送信対象とする1ビットの情報を取得し(ステップS201)、この1ビットがドミナントであるか否かを判定する(ステップS202)。 FIGS. 21 and 22 are flowcharts showing the procedure of the transmission process by the CAN communication control unit 16 of the fourth embodiment. The CAN communication control unit 16 acquires 1-bit information to be transmitted from the data to be transmitted (step S201), and determines whether the 1-bit is dominant (step S202).
 CAN通信制御部16は、送信対象の1ビットがドミナントである場合(S202:YES)、通信線5に対して第1信号レベルの信号出力を行い(ステップS203)、ステップS204へ処理を進める。またCAN通信制御部16は、送信対象の1ビットがドミナントでなくレセシブの場合(S202:NO)、信号出力を行わずに、ステップS204へ処理を進める。次いでCAN通信制御部16は、タイマを始動し(ステップS204)、このビットの送信処理開始から第1の所定時間Tpが経過したか否かを判定する(ステップS205)。第1の所定時間Tpが経過していない場合(S205:NO)、CAN通信制御部16は、タイマによる計時を継続し、第1の所定時間Tpが経過するまで待機する。 If the transmission target bit is dominant (S202: YES), the CAN communication control unit 16 outputs a signal at the first signal level to the communication line 5 (step S203), and proceeds to step S204. In addition, when one bit to be transmitted is not dominant and is recessive (S202: NO), the CAN communication control unit 16 advances the process to step S204 without performing signal output. Next, the CAN communication control unit 16 starts a timer (step S204), and determines whether or not a first predetermined time Tp has elapsed from the start of the bit transmission process (step S205). When the first predetermined time Tp has not elapsed (S205: NO), the CAN communication control unit 16 continues the time measurement by the timer and waits until the first predetermined time Tp elapses.
 第1の所定時間Tpが経過した場合(S205:YES)、CAN通信制御部16は、第2信号レベル(0V)の信号を通信線5に対して出力する(ステップS206)。その後、CAN通信制御部16は、第1の所定時間Tpの経過から更に第2の所定時間Thが経過したか否かを判定し(ステップS207)、第2の所定時間Thが経過していない場合(S207:NO)、第2の所定時間Thが経過するまで、第2信号レベルの信号を出力して待機する。第2の所定時間Thが経過した場合(S207:YES)、CAN通信制御部16は、信号出力を停止する(ステップS208)。 When the first predetermined time Tp has elapsed (S205: YES), the CAN communication control unit 16 outputs a signal of the second signal level (0 V) to the communication line 5 (step S206). Thereafter, the CAN communication control unit 16 determines whether or not the second predetermined time Th has elapsed since the first predetermined time Tp has elapsed (step S207), and the second predetermined time Th has not elapsed. In the case (S207: NO), a signal of the second signal level is output and waits until the second predetermined time Th has elapsed. When the second predetermined time Th has elapsed (S207: YES), the CAN communication control unit 16 stops signal output (step S208).
 次いで、CAN通信制御部16は、1ビットの送信時間Tbが経過したか否かを判定し(ステップS209)、1ビットの送信時間Tbが経過していない場合には(S209:NO)、送信時間Tbが経過するまで待機する。1ビットの送信時間Tbが経過した場合(S209:YES)、CAN通信制御部16は、タイマを停止し(ステップS210)、送信データの全ビットの送信を終えたか否かなどを判定することによって、送信を終了するか否かを判定する(ステップS211)。送信を終了しないと判定した場合(S211:NO)、CAN通信制御部16は、ステップS201へ処理を戻し、送信データの次のビットについて同様の処理を行う。送信を終了すると判定した場合(S211:YES)、CAN通信制御部16は、送信処理を終了する。 Next, the CAN communication control unit 16 determines whether or not the 1-bit transmission time Tb has elapsed (step S209). If the 1-bit transmission time Tb has not elapsed (S209: NO), the transmission is performed. Wait until time Tb has elapsed. When the 1-bit transmission time Tb has elapsed (S209: YES), the CAN communication control unit 16 stops the timer (step S210), and determines whether or not transmission of all bits of transmission data has been completed. Then, it is determined whether or not to end the transmission (step S211). If it is determined not to end the transmission (S211: NO), the CAN communication control unit 16 returns the process to step S201, and performs the same process for the next bit of the transmission data. If it is determined that the transmission is to be ended (S211: YES), the CAN communication control unit 16 ends the transmission process.
 図23及び図24は、実施の形態4のCAN通信制御部16による受信処理の手順を示すフローチャートである。CAN通信制御部16は、まず、信号出力を行わずに、端子をハイインピーダンス状態とすると共に(ステップS221)、切替部19の2つのスイッチSWをオフすることにより抵抗Rを切り離す(ステップS222)。 FIG. 23 and FIG. 24 are flowcharts showing a procedure of reception processing by the CAN communication control unit 16 according to the fourth embodiment. First, the CAN communication control unit 16 sets the terminal to a high impedance state without performing signal output (step S221), and disconnects the resistor R by turning off the two switches SW of the switching unit 19 (step S222). .
 次いでCAN通信制御部16は、通信線5の信号レベルが予め定められた閾値を超えたか否かを判定し(ステップS223)、信号レベルが閾値を超えない場合(S223:NO)、信号レベルが閾値を超えるまで待機する。信号レベルが閾値を超えた場合(S223:YES)、CAN通信制御部16は、通信線5の信号レベルのサンプリングを行い(ステップS224)、サンプリング開始から第1の所定時間Tpが経過したか否かを判定する(ステップS225)。第1の所定時間Tpが経過していない場合(S225:NO)、CAN通信制御部16は、ステップS224へ処理を戻し、第1の所定時間Tpが経過するまで信号レベルのサンプリングを繰り返し行う。 Next, the CAN communication control unit 16 determines whether or not the signal level of the communication line 5 exceeds a predetermined threshold value (step S223). If the signal level does not exceed the threshold value (S223: NO), the signal level is Wait until the threshold is exceeded. If the signal level exceeds the threshold (S223: YES), the CAN communication control unit 16 samples the signal level of the communication line 5 (step S224), and whether or not the first predetermined time Tp has elapsed since the start of sampling. Is determined (step S225). If the first predetermined time Tp has not elapsed (S225: NO), the CAN communication control unit 16 returns the processing to step S224, and repeats sampling of the signal level until the first predetermined time Tp has elapsed.
 第1の所定時間Tpが経過した場合(S225:YES)、CAN通信制御部16は、切替部19の2つのスイッチSWをオンすることによって抵抗器Rを接続する(ステップS226)。 When the first predetermined time Tp has elapsed (S225: YES), the CAN communication control unit 16 connects the resistor R by turning on the two switches SW of the switching unit 19 (step S226).
 次いでCAN通信制御部16は、第1の所定時間Tpの経過から更に第2の所定時間Thが経過したか否かを判定し(ステップS227)、第2の所定時間Thが経過していない場合(S227:NO)、第2の所定時間Thが経過するまで待機する。第2の所定時間Thが経過した場合(S227:YES)、CAN通信制御部16は、切替部19の2つのスイッチSWをオフすることにより抵抗Rを切り離し(ステップS228)、信号出力を停止して、端子をハイインピーダンス状態とする(ステップS229)。 Next, the CAN communication control unit 16 determines whether or not the second predetermined time Th has further elapsed from the elapse of the first predetermined time Tp (step S227), and the second predetermined time Th has not elapsed. (S227: NO), it waits until the second predetermined time Th elapses. When the second predetermined time Th has elapsed (S227: YES), the CAN communication control unit 16 disconnects the resistor R by turning off the two switches SW of the switching unit 19 (step S228), and stops signal output. Thus, the terminal is set to a high impedance state (step S229).
 その後、CAN通信制御部16は、1ビットの送信時間Tbが経過したか否かを判定し(ステップS230)、1ビットの送信時間Tbが経過していない場合には(S230:NO)、この時間が経過するまで待機する。1ビットの送信時間Tbが経過した場合(S230:YES)、CAN通信制御部16は、受信データの全ビットの受信を終えたか否かなどを判定することによって、受信を終了するか否かを判定する(ステップS231)。受信を終了しないと判定した場合(S231:NO)、CAN通信制御部16は、受信データの次のビットについて同様の処理を行うため、ステップS223へ処理を戻し、ステップS223~S231までの処理を行う。また、受信を終了すると判定した場合(S231:YES)、CAN通信制御部16は、受信処理を終了する。 Thereafter, the CAN communication control unit 16 determines whether or not the 1-bit transmission time Tb has elapsed (step S230). If the 1-bit transmission time Tb has not elapsed (S230: NO), Wait until time has passed. When the transmission time Tb of 1 bit has elapsed (S230: YES), the CAN communication control unit 16 determines whether or not to end the reception by determining whether or not the reception of all the bits of the reception data has been completed. Determination is made (step S231). When it is determined that the reception is not terminated (S231: NO), the CAN communication control unit 16 returns the process to step S223 to perform the same process for the next bit of the received data, and performs the processes from step S223 to S231. Do. If it is determined that the reception is to be ended (S231: YES), the CAN communication control unit 16 ends the reception process.
 図25は、実施の形態4に係る通信システムの効果を説明するための模式図であり、縦軸をツイスト線間の電位差とし、横軸を時間としたグラフである。図示の例は、1ビットの情報送信時間Tb=1000nsとし、0ns~1000nsにドミナント送信を行い、1000ns~2000nsにレセシブ送信を行った場合の波形である。またドミナント送信は、第1の所定時間Tp=800ns且つ第1信号レベル=2V、第2の所定時間Th=200ns且つ第2信号レベル=0Vの信号出力を行っている。 FIG. 25 is a schematic diagram for explaining the effect of the communication system according to the fourth embodiment, and is a graph in which the vertical axis represents a potential difference between twist lines and the horizontal axis represents time. The example shown in the figure is a waveform when 1-bit information transmission time Tb = 1000 ns, dominant transmission is performed from 0 ns to 1000 ns, and recessive transmission is performed from 1000 ns to 2000 ns. In the dominant transmission, signal output is performed for the first predetermined time Tp = 800 ns and the first signal level = 2V, the second predetermined time Th = 200 ns and the second signal level = 0V.
 図25に示した信号波形から、本発明の通信システムでは、図27に示した従来の通信システムの波形と比較して、リンギングの信号レベル(振幅)が低減されていることが分かる。従来の通信システムではリンギングの信号レベルが最大で4Vを超えているのに対し、本発明の通信システムではリンギングの信号レベルの最大は約0.8V程度である。このため本発明の通信システムでは、通信線5上の信号レベルを例えば0.9V又は1.0V等の閾値にて判定することによって、ドミナント/レセシブの判定を行うことが可能である。 25, it can be seen that the ringing signal level (amplitude) is reduced in the communication system of the present invention compared to the waveform of the conventional communication system shown in FIG. In the conventional communication system, the maximum ringing signal level exceeds 4V, whereas in the communication system of the present invention, the maximum ringing signal level is about 0.8V. Therefore, in the communication system of the present invention, it is possible to determine dominant / recessive by determining the signal level on the communication line 5 with a threshold value such as 0.9V or 1.0V.
 以上の構成の実施の形態4に係る通信システムは、ECU1の送信部17が、送信データがドミナントの場合には、第1の所定時間Tpに亘って第1信号レベルの信号を通信線5に出力して、その後の第2の所定時間Thに亘って第2信号レベル(0V)の信号を出力し、送信データがレセシブ且つ通信線5の信号レベルがレセシブの場合には、第1の所定時間Tp及び第2の所定時間Thに亘って通信線5へ信号出力をせずハイインピーダンス状態とし、送信データがレセシブ且つ通信線5の信号レベルがドミナントの場合には、第1の所定時間Tpに亘って通信線5へ信号出力をせずハイインピーダンス状態とし、その後第2の所定時間Thに亘って第2信号レベル(0V)の信号を出力する。またECU1のCAN通信制御部16は、切替部19のスイッチSWの接続/遮断を切り替えることによって、通信線5に対する抵抗器Rの接続/遮断を行うことが可能な構成であり、1ビットの送信時間Tbにおける第1の所定時間Tp経過後に抵抗器Rの接続を行う。これらの構成により、通信システムにおいて通信線5にリンギングが発生することを抑制できるため、通信の高速化を実現することができる。 In the communication system according to the fourth embodiment having the above-described configuration, when the transmission unit 17 of the ECU 1 transmits dominant data, the signal at the first signal level is transmitted to the communication line 5 over the first predetermined time Tp. When the transmission data is recessive and the signal level of the communication line 5 is recessive and the signal of the second signal level (0V) is output for the subsequent second predetermined time Th. When the signal is not output to the communication line 5 for the time Tp and the second predetermined time Th and the transmission data is recessive and the signal level of the communication line 5 is dominant, the first predetermined time Tp The signal is not output to the communication line 5 over a long period of time, and is set in a high impedance state, and then a signal of the second signal level (0 V) is output over a second predetermined time Th. The CAN communication control unit 16 of the ECU 1 is configured to be able to connect / disconnect the resistor R to the communication line 5 by switching connection / disconnection of the switch SW of the switching unit 19. The resistor R is connected after the elapse of the first predetermined time Tp at the time Tb. With these configurations, the occurrence of ringing in the communication line 5 in the communication system can be suppressed, so that high-speed communication can be realized.
 また通信システム中の2つのECU1間の最短距離をLとし、通信線5の単位長さ当たりの伝達時間をAとした場合に、第1の所定時間Tp及び第2の所定時間Thを、
  Tp+Th≦Tb
  Th≧2×L×A
の条件を満たすように設定する。これにより、一のECU1から出力された信号が他のECU1にて反射されて、反射波が一のECU1へ戻る前に、一のECU1がハイインピーダンス状態となることがないため、リンギングの発生をより確実に抑制することができる。
Further, when the shortest distance between two ECUs 1 in the communication system is L and the transmission time per unit length of the communication line 5 is A, the first predetermined time Tp and the second predetermined time Th are:
Tp + Th ≦ Tb
Th ≧ 2 × L × A
Set to satisfy the conditions. As a result, the signal output from one ECU 1 is reflected by the other ECU 1 and the one ECU 1 does not enter the high impedance state before the reflected wave returns to the one ECU 1. It can suppress more reliably.
 なお、第1の所定時間Tp及び第2の所定時間Thは、Tp+Th≦Tbであればよいため、Tp+Th<Tbの場合には、第2の所定時間Thの終了から1ビットの送信時間Tbが経過するまでの時間が存在する。本実施の形態においては、この時間中に切替部19のスイッチSWをオンする構成としたが、これに限るものではなく、スイッチSWをオフしてもよい。また図21及び図22に示すフローチャートは、Tp+Th<Tbの場合を想定したものであるが、これに限るものではなく、Tp+Th=Tbであってもよく、送信データがドミナントの場合にはステップS212及びS213の処理を行わなければよい。また、受信処理において信号レベルのサンプリングを第1の所定時間Tpに亘って行う構成としたが、これに限るものではなく、第1の所定時間Tpより短い時間(所定サンプリング期間Th)に亘ってサンプリングを行う構成であってもよい。 The first predetermined time Tp and the second predetermined time Th need only satisfy Tp + Th ≦ Tb. Therefore, when Tp + Th <Tb, the transmission time Tb of 1 bit from the end of the second predetermined time Th is There is time to elapse. In the present embodiment, the switch SW of the switching unit 19 is turned on during this time. However, the present invention is not limited to this, and the switch SW may be turned off. 21 and 22 assume that Tp + Th <Tb. However, the present invention is not limited to this, and Tp + Th = Tb may be used. If the transmission data is dominant, step S212 is performed. And S213 may not be performed. In addition, the signal level is sampled in the reception process over the first predetermined time Tp. However, the present invention is not limited to this, and the time is shorter than the first predetermined time Tp (predetermined sampling period Th). It may be configured to perform sampling.
 1、1a~1e ECU(通信装置)
 5 通信線
 5a 幹線
 5b~5d 支線
 11 制御部(評価手段、選別手段、所定時間決定手段、所定サンプリング期間決定手段)
 16 CAN通信制御部(通信手段、算出手段、判定手段、検知手段、切替制御手段)
 17 送信部(試験送信手段、評価結果送信手段、所定時間情報送信手段)
 18 受信部(評価結果受信手段、所定時間情報受信手段)
 19 切替部
 R 抵抗器
 SW スイッチ
1, 1a to 1e ECU (communication device)
5 communication line 5a trunk line 5b to 5d branch line 11 control unit (evaluation means, selection means, predetermined time determination means, predetermined sampling period determination means)
16 CAN communication control unit (communication means, calculation means, determination means, detection means, switching control means)
17 Transmitter (test transmission means, evaluation result transmission means, predetermined time information transmission means)
18 Receiver (Evaluation result receiving means, predetermined time information receiving means)
19 Switching part R Resistor SW Switch

Claims (19)

  1.  共通の通信線を介して接続された複数の通信装置を備え、各通信装置が、前記通信線を介して各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信手段をそれぞれ有する通信システムにおいて、
     前記通信手段は、
     送信する情報の優性値に対して、1ビット分の情報送信時間より短い所定時間Tpに亘って所定信号レベルのパルス信号を前記通信線へ出力した後、前記通信線への信号出力を行わず、
     送信する情報の劣性値に対して、前記通信線への信号出力を行わないようにしてあること
     を特徴とする通信システム。
    A plurality of communication devices connected via a common communication line, and each communication device receives information of a plurality of consecutive bits each represented by a binary value of a dominant value or a recessive value via the communication line. In a communication system having communication means for transmitting and receiving,
    The communication means includes
    A pulse signal having a predetermined signal level is output to the communication line for a predetermined time Tp shorter than the information transmission time for one bit with respect to the superiority value of the information to be transmitted, and then no signal is output to the communication line. ,
    A communication system, wherein a signal output to the communication line is not performed for an inferior value of information to be transmitted.
  2.  共通の通信線を介して接続された複数の通信装置を備え、各通信装置が、前記通信線を介して各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信手段をそれぞれ有する通信システムにおいて、
     前記通信手段は、
     送信する情報の優性値に対して、1ビット分の情報送信時間より短い第1の所定時間Tpに亘って第1信号レベルの信号を出力した後、前記情報送信時間より短い第2の所定時間Thに亘って前記第1信号レベルより低い第2信号レベルの信号を出力し、
     送信する情報の劣性値に対して、前記通信線への信号出力を行わないようにしてあること
     を特徴とする通信システム。
    A plurality of communication devices connected via a common communication line, and each communication device receives information of a plurality of consecutive bits each represented by a binary value of a dominant value or a recessive value via the communication line. In a communication system having communication means for transmitting and receiving,
    The communication means includes
    A second predetermined time shorter than the information transmission time after outputting a signal of the first signal level over a first predetermined time Tp shorter than the information transmission time of 1 bit with respect to the dominant value of the information to be transmitted Outputting a signal of a second signal level lower than the first signal level over Th;
    A communication system, wherein a signal output to the communication line is not performed for an inferior value of information to be transmitted.
  3.  前記通信装置は、
     一端が固定電位に接続された抵抗器の他端を、前記通信線に対して接続/遮断する切替部と、
     前記1ビット分の情報送信時間において前記第1の所定時間Tpが経過した後に、前記抵抗器を接続するよう前記切替部の制御を行う切替制御手段と
     を備えること
     を特徴とする請求項2に記載の通信システム。
    The communication device
    A switching unit for connecting / blocking the other end of the resistor, one end of which is connected to a fixed potential, with respect to the communication line;
    The switching control means for controlling the switching unit so as to connect the resistor after the first predetermined time Tp has elapsed in the information transmission time for the one bit. The communication system described.
  4.  前記第1の所定時間Tp及び前記第2の所定時間Thは、
      Tp+Th≦Tb
      Th≧2×L×A
     の条件を満たすこと
     (ただし、前記Tbは前記1ビット分の情報送信時間であり、前記Lは一の通信装置から他の通信装置までに介在する前記通信線の最短距離であり、前記Aは前記通信線の単位長さ当たりにおける信号の伝達時間である。)
     を特徴とする請求項2又は請求項3に記載の通信システム。
    The first predetermined time Tp and the second predetermined time Th are:
    Tp + Th ≦ Tb
    Th ≧ 2 × L × A
    Where Tb is the information transmission time for 1 bit, L is the shortest distance of the communication line interposed from one communication device to another communication device, and A is (This is the signal transmission time per unit length of the communication line.)
    The communication system according to claim 2 or claim 3, wherein
  5.  前記通信装置は、
     前記通信手段が優性値又は劣性値に係る情報を前記通信線へ出力した場合に、所定サンプリング期間Tdに亘って前記通信線における信号レベルのサンプリングを複数回行って、前記所定サンプリング期間Tdの信号レベルの平均値を算出する算出手段と、
     該算出手段が算出した平均値に応じて、前記通信線に送信された信号が優性値又は劣性値のいずれであるかを判定する判定手段と、
     劣性値の情報を送信した後に前記判定手段が優性値であると判定した場合に、他の通信装置からの情報送信を検知する検知手段と
     を有すること
     を特徴とする請求項1乃至請求項4のいずれか1つに記載の通信システム。
    The communication device
    When the communication means outputs information relating to the dominant value or the inferior value to the communication line, the signal of the predetermined sampling period Td is sampled a plurality of times over the predetermined sampling period Td and the signal level in the communication line is sampled. A calculation means for calculating an average value of the levels;
    Determining means for determining whether a signal transmitted to the communication line is a dominant value or a recessive value according to the average value calculated by the calculating means;
    5. A detection unit that detects information transmission from another communication device when the determination unit determines that it is a dominant value after transmitting information of a recessive value. The communication system according to any one of the above.
  6.  前記通信装置は、
     前記通信手段が優性値又は劣性値に係る情報を前記通信線へ出力した場合に、所定サンプリング期間Tdに亘って前記通信線における信号レベルのサンプリングを複数回行って、各サンプリング結果の信号レベルと閾値とを比較する比較手段と、
     該比較手段の比較結果に基づき、信号レベルが前記閾値を超えるサンプル数及び信号レベルが前記閾値を超えないサンプル数に応じて、前記通信線に送信された信号が優性値又は劣性値のいずれであるかを判定する判定手段と、
     劣性値の情報を送信した後に前記判定手段が優性値であると判定した場合に、他の通信装置からの情報送信を検知する検知手段と
     を有すること
     を特徴とする請求項1乃至請求項4のいずれか1つに記載の通信システム。
    The communication device
    When the communication means outputs information relating to the dominant value or the inferior value to the communication line, the signal level in the communication line is sampled a plurality of times over a predetermined sampling period Td, and the signal level of each sampling result A comparison means for comparing the threshold value;
    Based on the comparison result of the comparison means, the signal transmitted to the communication line is either a dominant value or a recessive value depending on the number of samples whose signal level exceeds the threshold and the number of samples whose signal level does not exceed the threshold. Determination means for determining whether there is,
    5. A detection unit that detects information transmission from another communication device when the determination unit determines that it is a dominant value after transmitting information of a recessive value. The communication system according to any one of the above.
  7.  前記通信装置は、
     所定時間Tpが異なる複数の優性値の情報を順に送信する試験送信手段と、
     該試験送信手段が送信した情報に対して異なる所定サンプリング期間Tdに亘るサンプリングを行って前記判定手段による判定を行い、所定時間Tp及び所定サンプリング期間Tdの組み合わせに対して受信結果を評価する評価手段と、
     該評価手段による評価結果に基づいて、各所定時間Tpに対して評価が高い所定サンプリング期間Tdを選別する選別手段と
     を有し、
     一の通信装置が前記試験送信手段による送信を行って、各通信装置が前記評価手段による評価及び前記選別手段による選別を行う処理を、全ての通信装置について順に行い、
     各通信装置の前記選別手段による選別結果に基づいて、所定時間Tp及び所定サンプリング期間Tdを決定するようにしてあること
     を特徴とする請求項5又は請求項6に記載の通信システム。
    The communication device
    Test transmission means for sequentially transmitting information of a plurality of dominant values having different predetermined times Tp;
    Evaluation means for performing sampling over different predetermined sampling periods Td on the information transmitted by the test transmission means, making a determination by the determination means, and evaluating a reception result for a combination of the predetermined time Tp and the predetermined sampling period Td When,
    Screening means for selecting a predetermined sampling period Td having a high evaluation for each predetermined time Tp based on the evaluation result by the evaluation means;
    One communication apparatus performs transmission by the test transmission means, and each communication apparatus performs processing for evaluation by the evaluation means and selection by the selection means in order for all communication apparatuses,
    The communication system according to claim 5 or 6, wherein a predetermined time Tp and a predetermined sampling period Td are determined based on a selection result obtained by the selection unit of each communication device.
  8.  前記試験送信手段は、優性値の情報及び劣性値の情報を交互に送信するようにしてあること
     を特徴とする請求項7に記載の通信システム。
    The communication system according to claim 7, wherein the test transmission unit is configured to alternately transmit dominant value information and recessive value information.
  9.  前記評価手段は、優性値の情報を優性値と判定した数、劣性値の情報を優性値と判定した数及びサンプリング数に応じた評価値を算出するようにしてあること
     を特徴とする請求項8に記載の通信システム。
    The evaluation means calculates the evaluation value according to the number of the dominant value information determined as the dominant value, the number of the recessive value information determined as the dominant value, and the sampling number. 9. The communication system according to 8.
  10.  前記複数の通信装置には、一の主通信装置及び複数の従通信装置を含み、
     前記従通信装置は、前記選別手段の選別結果に対応する前記評価手段の評価結果を、前記主通信装置へ送信する評価結果送信手段を有し、
     前記主通信装置は、
     複数の前記従通信装置が送信した評価結果を受信する評価結果受信手段と、
     該評価結果受信手段が受信した複数の評価結果に基づき、前記所定時間Tpを決定する所定時間決定手段と、
     該所定時間決定手段が決定した所定時間Tpの情報を、複数の前記従通信装置へ送信する所定時間情報送信手段と
     を有し、
     前記従通信装置は、
     前記所定時間情報送信手段が送信した所定時間Tpの情報を受信する所定時間情報受信手段を更に有し、
     該所定時間情報受信手段が受信した所定時間Tpにて、前記通信手段による以後の信号出力を行うようにしてあること
     を特徴とする請求項7乃至請求項9のいずれか1つに記載の通信システム。
    The plurality of communication devices include one master communication device and a plurality of slave communication devices,
    The slave communication device has an evaluation result transmission unit that transmits an evaluation result of the evaluation unit corresponding to a selection result of the selection unit to the main communication device,
    The main communication device is:
    Evaluation result receiving means for receiving the evaluation results transmitted by the plurality of slave communication devices;
    Predetermined time determining means for determining the predetermined time Tp based on a plurality of evaluation results received by the evaluation result receiving means;
    Predetermined time information transmitting means for transmitting information on the predetermined time Tp determined by the predetermined time determining means to the plurality of slave communication devices,
    The slave communication device is:
    A predetermined time information receiving means for receiving information on the predetermined time Tp transmitted by the predetermined time information transmitting means;
    The communication according to any one of claims 7 to 9, wherein the communication means performs subsequent signal output at the predetermined time Tp received by the predetermined time information receiving means. system.
  11.  前記主通信装置は、
     前記所定時間決定手段が決定した所定時間Tpに応じて、前記所定サンプリング期間Tdを決定する所定サンプリング期間決定手段を有し、
     該所定サンプリング期間決定手段が決定した所定サンプリング期間Tdにて、以後のサンプリングを行うようにしてあり、
     前記従通信装置は、
     前記所定時間情報受信手段が受信した所定時間Tpに応じて、前記所定サンプリング期間Tdを決定する所定サンプリング期間決定手段を有し、
     該所定サンプリング期間決定手段が決定した所定サンプリング期間Tdにて、以後のサンプリングを行うようにしてあること
     を特徴とする請求項10に記載の通信システム。
    The main communication device is:
    Predetermined sampling period determining means for determining the predetermined sampling period Td according to the predetermined time Tp determined by the predetermined time determining means;
    The subsequent sampling is performed in the predetermined sampling period Td determined by the predetermined sampling period determining means,
    The slave communication device is:
    Predetermined sampling period determining means for determining the predetermined sampling period Td according to the predetermined time Tp received by the predetermined time information receiving means;
    The communication system according to claim 10, wherein the subsequent sampling is performed in the predetermined sampling period Td determined by the predetermined sampling period determining means.
  12.  共通の通信線を介して他の装置に接続され、前記通信線を介して各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信手段を備える通信装置において、
     前記通信手段は、
     送信する情報の優性値に対して、1ビット分の情報送信時間より短い所定時間Tpに亘って所定信号レベルのパルス信号を前記通信線へ出力した後、前記通信線への信号出力を行わず、
     送信する情報の劣性値に対して、前記通信線への信号出力を行わないようにしてあること
     を特徴とする通信装置。
    A communication device connected to another device via a common communication line, and comprising a communication means for transmitting and receiving information of a plurality of consecutive bits each represented by a binary value of a dominant value or an inferior value via the communication line In
    The communication means includes
    A pulse signal having a predetermined signal level is output to the communication line for a predetermined time Tp shorter than the information transmission time for one bit with respect to the superiority value of the information to be transmitted, and then no signal is output to the communication line. ,
    A communication apparatus characterized by not outputting a signal to the communication line for an inferior value of information to be transmitted.
  13.  共通の通信線を介して他の装置に接続され、前記通信線を介して各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信手段を備える通信装置において、
     前記通信手段は、
     送信する情報の優性値に対して、1ビット分の情報送信時間より短い第1の所定時間Tpに亘って第1信号レベルの信号を出力した後、前記情報送信時間より短い第2の所定時間Thに亘って前記第1信号レベルより低い第2信号レベルの信号を出力し、
     送信する情報の劣性値に対して、前記通信線への信号出力を行わないようにしてあること
     を特徴とする通信装置。
    A communication device connected to another device via a common communication line, and comprising a communication means for transmitting and receiving information of a plurality of consecutive bits each represented by a binary value of a dominant value or an inferior value via the communication line In
    The communication means includes
    A second predetermined time shorter than the information transmission time after outputting a signal of the first signal level over a first predetermined time Tp shorter than the information transmission time of 1 bit with respect to the dominant value of the information to be transmitted Outputting a signal of a second signal level lower than the first signal level over Th;
    A communication apparatus characterized by not outputting a signal to the communication line for an inferior value of information to be transmitted.
  14.  前記通信手段が優性値又は劣性値に係る情報を前記通信線へ出力した場合に、所定サンプリング期間Tdに亘って前記通信線における信号レベルのサンプリングを複数回行って、前記所定サンプリング期間Tdの信号レベルの平均値を算出する算出手段と、
     該算出手段が算出した平均値に応じて、前記通信線に送信された信号が優性値又は劣性値のいずれであるかを判定する判定手段と、
     劣性値の情報を送信した後に前記判定手段が優性値であると判定した場合に、他の通信装置からの情報送信を検知する検知手段と
     を備えること
     を特徴とする請求項12又は請求項13に記載の通信装置。
    When the communication means outputs information relating to the dominant value or the inferior value to the communication line, the signal of the predetermined sampling period Td is sampled a plurality of times over the predetermined sampling period Td and the signal level in the communication line is sampled. A calculation means for calculating an average value of the levels;
    Determining means for determining whether a signal transmitted to the communication line is a dominant value or a recessive value according to the average value calculated by the calculating means;
    14. A detection means for detecting information transmission from another communication device when the determination means determines that it is a dominant value after transmitting the information of the recessive value. The communication apparatus as described in.
  15.  前記通信手段が優性値又は劣性値に係る情報を前記通信線へ出力した場合に、所定サンプリング期間Tdに亘って前記通信線における信号レベルのサンプリングを複数回行って、各サンプリング結果の信号レベルと閾値とを比較する比較手段と、
     該比較手段の比較結果に基づき、信号レベルが前記閾値を超えるサンプル数及び信号レベルが前記閾値を超えないサンプル数に応じて、前記通信線に送信された信号が優性値又は劣性値のいずれであるかを判定する判定手段と、
     劣性値の情報を送信した後に前記判定手段が優性値であると判定した場合に、他の通信装置からの情報送信を検知する検知手段と
     を備えること
     を特徴とする請求項12又は請求項13に記載の通信装置。
    When the communication means outputs information relating to the dominant value or the inferior value to the communication line, the signal level in the communication line is sampled a plurality of times over a predetermined sampling period Td, and the signal level of each sampling result A comparison means for comparing the threshold value;
    Based on the comparison result of the comparison means, the signal transmitted to the communication line is either a dominant value or a recessive value depending on the number of samples whose signal level exceeds the threshold and the number of samples whose signal level does not exceed the threshold. Determination means for determining whether there is,
    14. A detection means for detecting information transmission from another communication device when the determination means determines that it is a dominant value after transmitting the information of the recessive value. The communication apparatus as described in.
  16.  所定時間Tpが異なる複数の優性値の情報を順に送信する試験送信手段と、
     該試験送信手段が送信した情報に対して異なる所定サンプリング期間Tdに亘るサンプリングを行って前記判定手段による判定を行い、所定時間Tp及び所定サンプリング期間Tdの組み合わせに対する受信結果を評価する評価手段と、
     該評価手段による評価結果に基づいて、各所定時間Tpに対して評価が高い所定サンプリング期間Tdを選別する選別手段と
     を備えること
     を特徴とする請求項14又は請求項15に記載の通信装置。
    Test transmission means for sequentially transmitting information of a plurality of dominant values having different predetermined times Tp;
    Evaluation means for performing sampling over different predetermined sampling periods Td on the information transmitted by the test transmission means, performing determination by the determination means, and evaluating a reception result for a combination of the predetermined time Tp and the predetermined sampling period Td;
    The communication device according to claim 14, further comprising: a selection unit that selects a predetermined sampling period Td that is highly evaluated for each predetermined time Tp based on an evaluation result by the evaluation unit.
  17.  共通の通信線を介して、各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信方法において、
     送信する情報の優性値に対して、1ビット分の情報送信時間より短い所定時間Tpに亘って所定信号レベルのパルス信号を前記通信線へ出力した後、前記通信線への信号出力を行わず、
     送信する情報の劣性値に対して、前記通信線への信号出力を行わないこと
     を特徴とする通信方法。
    In a communication method of transmitting and receiving information of a plurality of consecutive bits each represented by a binary value of a dominant value or a recessive value via a common communication line,
    A pulse signal having a predetermined signal level is output to the communication line for a predetermined time Tp shorter than the information transmission time for one bit with respect to the superiority value of the information to be transmitted, and then no signal is output to the communication line. ,
    A communication method characterized by not outputting a signal to the communication line with respect to an inferior value of information to be transmitted.
  18.  共通の通信線を介して、各ビットが優性値又は劣性値の2値で表される連続した複数ビットの情報を送受信する通信方法において、
     送信する情報の優性値に対して、1ビット分の情報送信時間より短い第1の所定時間Tpに亘って第1信号レベルの信号を出力した後、前記情報送信時間より短い第2の所定時間Thに亘って前記第1信号レベルより低い第2信号レベルの信号を出力し、
     送信する情報の劣性値に対して、前記通信線への信号出力を行わないこと
     を特徴とする通信方法。
    In a communication method of transmitting and receiving information of a plurality of consecutive bits each represented by a binary value of a dominant value or a recessive value via a common communication line,
    A second predetermined time shorter than the information transmission time after outputting a signal of the first signal level over a first predetermined time Tp shorter than the information transmission time of 1 bit with respect to the dominant value of the information to be transmitted Outputting a signal of a second signal level lower than the first signal level over Th;
    A communication method characterized by not outputting a signal to the communication line with respect to an inferior value of information to be transmitted.
  19.  請求項5又は請求項6に記載の通信システムにて、前記所定時間Tp及び前記所定サンプリング期間Tdを決定する通信パラメータ決定方法であって、
     一の通信装置にて所定時間Tpが異なる複数の優性値の情報を順に送信し、
     前記一の通信装置が送信した情報に対して異なる所定サンプリング期間Tdに亘るサンプリングを行って前記判定手段による判定を行い、所定時間Tp及び所定サンプリング期間Tdの組み合わせに対する受信結果を評価し、
     評価結果に基づいて、各所定時間Tpに対して評価が高い所定サンプリング期間Tdを選別し、
     一の通信装置の送信を行って、各通信装置が評価及び選別を行う処理を、全ての通信装置について順に行い、
     各通信装置の選別結果に基づいて、所定時間Tp及び所定サンプリング期間Tdを決定すること
     を特徴とする通信パラメータ決定方法。
    The communication parameter determination method for determining the predetermined time Tp and the predetermined sampling period Td in the communication system according to claim 5 or 6,
    A plurality of dominant values with different predetermined times Tp are transmitted in order in one communication device,
    Sampling over different predetermined sampling periods Td on the information transmitted by the one communication device to make a determination by the determination means, evaluating a reception result for a combination of the predetermined time Tp and the predetermined sampling period Td,
    Based on the evaluation result, a predetermined sampling period Td having a high evaluation for each predetermined time Tp is selected,
    One communication device is transmitted, and the processing in which each communication device performs evaluation and selection is performed sequentially for all communication devices,
    A communication parameter determining method, wherein a predetermined time Tp and a predetermined sampling period Td are determined based on a selection result of each communication device.
PCT/JP2012/075883 2011-10-06 2012-10-05 Communication system, communication device, communication method, and communication parameter determining method WO2013051677A1 (en)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
JP2011-222299 2011-10-06
JP2011222299 2011-10-06
JP2011-241621 2011-11-02
JP2011241621A JP2013098871A (en) 2011-11-02 2011-11-02 Communication system, communication device, and communication method
JP2012-047060 2012-03-02
JP2012047060A JP2013093827A (en) 2011-10-06 2012-03-02 Communication system, communication device, communication method, and communication parameter determining method

Publications (1)

Publication Number Publication Date
WO2013051677A1 true WO2013051677A1 (en) 2013-04-11

Family

ID=48043830

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/075883 WO2013051677A1 (en) 2011-10-06 2012-10-05 Communication system, communication device, communication method, and communication parameter determining method

Country Status (1)

Country Link
WO (1) WO2013051677A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013085098A (en) * 2011-10-07 2013-05-09 Kyoto Institute Of Technology Communication system, communication device and communication method
US9413566B2 (en) 2014-07-31 2016-08-09 Denso Corporation Signal transmission circuit
CN108600039A (en) * 2017-03-13 2018-09-28 本田技研工业株式会社 Communication device, communication means and storage medium
JPWO2021124407A1 (en) * 2019-12-16 2021-06-24

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006067543A (en) * 2004-07-28 2006-03-09 Auto Network Gijutsu Kenkyusho:Kk Connector, vehicle-mounted bus drive, protective circuit, adaptor, wire harness for vehicle-mounted bus branch line, waveform shaping device for vehicle-mounted bus branch line, and joint connector for vehicle-mounted bus
JP2011250282A (en) * 2010-05-28 2011-12-08 Nippon Soken Inc Communication signal generator and communication device
JP2011259234A (en) * 2010-06-09 2011-12-22 Nippon Soken Inc Communication signal generation device and communication device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006067543A (en) * 2004-07-28 2006-03-09 Auto Network Gijutsu Kenkyusho:Kk Connector, vehicle-mounted bus drive, protective circuit, adaptor, wire harness for vehicle-mounted bus branch line, waveform shaping device for vehicle-mounted bus branch line, and joint connector for vehicle-mounted bus
JP2011250282A (en) * 2010-05-28 2011-12-08 Nippon Soken Inc Communication signal generator and communication device
JP2011259234A (en) * 2010-06-09 2011-12-22 Nippon Soken Inc Communication signal generation device and communication device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013085098A (en) * 2011-10-07 2013-05-09 Kyoto Institute Of Technology Communication system, communication device and communication method
US9413566B2 (en) 2014-07-31 2016-08-09 Denso Corporation Signal transmission circuit
CN108600039A (en) * 2017-03-13 2018-09-28 本田技研工业株式会社 Communication device, communication means and storage medium
JPWO2021124407A1 (en) * 2019-12-16 2021-06-24
WO2021124407A1 (en) * 2019-12-16 2021-06-24 日本電信電話株式会社 Terminal device, communication method, and communication system
JP7287501B2 (en) 2019-12-16 2023-06-06 日本電信電話株式会社 Terminal device, communication method, and communication system

Similar Documents

Publication Publication Date Title
US8593985B2 (en) Transmitting apparatus, receiving apparatus, transmitting and receiving system, and transmitting and receiving method
US7808247B1 (en) Fast cable tester
WO2013051677A1 (en) Communication system, communication device, communication method, and communication parameter determining method
KR101037273B1 (en) Method and system for compensating for asymmetric delays
JP2013093827A (en) Communication system, communication device, communication method, and communication parameter determining method
JP5778099B2 (en) Receiver circuit
CN101521492B (en) Impedance matching circuit and related method thereof
US9664496B2 (en) Cable length determination using variable-width pulses
US8228074B2 (en) Method and apparatus for estimating cable length
JP2019096960A (en) Transmission equipment and transmission method
JPWO2012101808A1 (en) Communication interface device, air conditioner, communication control method, and program
US8074004B2 (en) Electronic device for contention detection of bidirectional bus and related method
JP2013098871A (en) Communication system, communication device, and communication method
JP6834721B2 (en) Communication device
CN107294762B (en) Telecommunication system for programmable logic controller
US7440697B1 (en) Data bus for a plurality of nodes
US20230273251A1 (en) Communication Device, Communication System, and Communication Method
CN103973279A (en) Bus communication transceiver
US7626399B2 (en) Broken lead detection
JP5794628B2 (en) COMMUNICATION SYSTEM, COMMUNICATION DEVICE, AND COMMUNICATION METHOD
CN103200135A (en) Transmitting/receiving system, and transmitting/receiving method
TWI598600B (en) Method for performing cable diagnostics in a network system, and associated apparatus
CN114270783A (en) Method for identifying the position of a bus subscriber
US8566655B2 (en) Method for operating a communication system having a plurality of nodes, and a communication system therefor
KR20160068755A (en) Transmitter, receiver, transmission method, and receiving method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12839043

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12839043

Country of ref document: EP

Kind code of ref document: A1