Speed sensor emulator for hardware-in-the-loop
The HIL system employs two flip-flops to generate current-based speed sensor emulations, addressing noise interference issues and providing accurate rotation direction encoding at a lower cost.
Patent Information
- Application Number
- DE202024103205
- Authority / Receiving Office
- DE · DE
- Patent Type
- Utility models
- Current Assignee / Owner
- Priority Date
- 2023-06-16
- Filing Date
- 2024-06-14
- Publication Date
- 2024-12-05
- Estimated Expiration
- 2034-06-30
AI Technical Summary
Existing hardware-in-the-loop (HIL) systems struggle with emulating speed sensors in environments prone to electrical noise, particularly in systems where voltage-based sensors are less effective due to interference.
A HIL system utilizing two flip-flops to generate pulse width modulated signals, which are converted into current outputs to emulate a current output speed sensor, reducing the impact of electrical noise by using voltage-controlled current sources.
The system provides reliable emulation of current output speed sensors at a lower financial cost, effectively simulating single-wire sensors and accurately encoding the direction of rotation through duty cycle adjustments, while minimizing electrical interference.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to a method and system for simulating a speed sensor with a current output. The speed sensor can provide feedback about the speed of an internal combustion engine, an electric machine, a wheel, a gear, or other rotating device. GENERAL STATE OF THE ART AND OVERVIEW
[0002] A hardware-in-the-loop (HIL) system can interface with a controller (e.g., a vehicle system controller, an engine controller, an electric machine controller, a braking system controller, etc.), and the HIL system can emulate sensors, actuators, and other devices connected to the controller when the controller is deployed in a system. The HIL system can receive inputs from the controller and provide outputs to the controller as part of a process for evaluating the controller. One type of output signal the HIL system can provide to a controller acting as a device under test is an emulated speed signal generated as an output voltage by the HIL system. While sensors that output a voltage may be effective for some systems, they may be less effective in others, such as systems that generate higher levels of electrical noise.Sensors that output a voltage level can be replaced with other sensors that are less susceptible to electrical noise. Therefore, it may be desirable for a HIL system to emulate other types of speed sensors that are less susceptible to electrical noise.
[0003] The inventors have recognized the above-mentioned problems and developed a sensor emulation system comprising: a first flip-flop configured to receive a signal at a clock input of the first flip-flop and provide a first voltage output to a first voltage-controlled current source; and a second flip-flop configured to receive an inversion of the signal at a clock input of the second flip-flop and provide a second voltage output to a second voltage-controlled current source.
[0004] By generating a signal via a HIL system and inputting the signal to two flip-flops that drive voltage-controlled current sources, the technical result of emulating a speed sensor's current output can be achieved. Specifically, the HIL system can generate a pulse-width modulated signal via a digital output, and the signal and the inverse of the signal can be input to the two flip-flops. The flip-flops can generate a first signal and a second signal, with the second signal phase-shifted from the first signal. The first and second signals can be fed to two voltage-controlled current sources, and the two voltage-controlled current sources can be electrically connected to a device under test.
[0005] The present description can offer several advantages. In particular, the approach can enable the reliable emulation of a current-output speed sensor. Furthermore, a HIL system can emulate a current-output speed sensor at a lower cost. Furthermore, the approach can be applied to single-wire sensors, where the rotational direction of a device is encoded in the duty cycle of an output signal.
[0006] It should be understood that the above summary is intended to introduce, in simplified form, a selection of concepts that are further explained in the detailed description. It is not intended to identify the most important or essential features of the claimed subject matter, the scope of which is clearly defined by the claims that follow the detailed description. Furthermore, the claimed subject matter is not limited to implementations that address the disadvantages noted above or elsewhere in this disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The accompanying drawings are incorporated herein as part of the specification. The drawings described herein illustrate embodiments of the subject matter disclosed herein and are illustrative of selected principles and teachings of the present disclosure. However, the drawings do not represent all possible implementations of the subject matter disclosed herein and are not intended to limit the scope of the present disclosure in any way. Fig. Figure 1 is a schematic diagram of a vehicle with control and wheel speed sensors; Fig. Figure 2 is a block diagram of an exemplary HIL system used to control Fig. 1 is coupled; Fig. 3 shows a circuit example for emulating a speed sensor with current output; Fig. 4 shows a truth table for a D flip-flop; Fig. 5 shows a speed sensor and examples of the direction of rotation; Fig. 6 shows the signal outputs for the circuit of Fig. 3; Fig. Figure 7 shows an example of simulating a change of direction for a monitored wheel or shaft; Fig. 8 and Fig. 9 show an example state machine for emulating a speed sensor with current output; and Fig. Figures 10-12 show example sequences for emulating the degradation of a speed sensor. DETAILED DESCRIPTION
[0008] The following description relates to systems and methods for emulating a speed sensor with a current output via a HIL system. In one example, the HIL outputs a pulse-width modulated signal via a digital voltage output, and the digital voltage output is converted into two current outputs to reduce influences that may be associated with electrical noise sources (e.g., switching transistors of an inverter, etc.). The HIL system and the speed sensor emulation can be used to evaluate components and systems of a vehicle of the type described in Fig. 1. The HIL system can be used as shown in Fig. 2. The HIL system may interface with a speed sensor with current output emulator circuit as shown in Fig. 3. The flip-flops of the emulation circuit can be configured as shown in the truth table in Fig. 4. The emulation circuit can simulate the operation of a speed sensor, as shown in Fig. 5. The emulation circuit can be configured as shown in Fig. 6 and Fig. 7. The emulation circuit and the HIL system can be configured according to the state machine in Fig. 8 and Fig. 9. The emulation circuit and the HIL system can also simulate the deterioration of the speed sensor, as shown in the Fig. 10-12 shown.
[0009] It is understood that, unless expressly stated to the contrary, the present disclosure may assume various alternative orientations and sequences of steps. It is also understood that the particular devices and processes illustrated in the accompanying drawings and described in the following description are merely embodiments of the inventive concepts disclosed herein. Therefore, specific dimensions, directions, or other physical characteristics relating to the various disclosed embodiments are not to be considered limiting unless expressly stated to the contrary.
[0010] It is within the scope of this disclosure, and is only a non-limiting example, that the method and system may be used for a HIL system in automotive, off-highway, all-terrain vehicle, engineering, and construction applications. Also, as a non-limiting example, the method and system disclosed herein for constructing and operating a HIL system may also be used for evaluation control systems in passenger vehicles, electric vehicles, hybrid vehicles, commercial vehicles, and autonomous vehicles.
[0011] Fig. 1 illustrates an exemplary vehicle powertrain 199 included in vehicle 100. Mechanical connections are shown in Fig. 1 as solid lines, and electrical connections are shown as dashed lines.
[0012] The vehicle 100 has a front end 110 and a rear end 111. The vehicle 100 includes front wheels 102 and rear wheels 103. In this example, the vehicle 100 is configured as a two-wheel drive vehicle; however, in other examples, the vehicle 100 may be configured as a four-wheel drive vehicle. The vehicle 100 has a motive power source 120 that can selectively provide motive power to the rear axle 190 and the front axle 101. The motive power source 120 may be an internal combustion engine (e.g., spark-ignition or diesel), or the motive power source 120 may alternatively be an electric machine (e.g., a motor / generator), or a combination thereof. The motive power source 120 is shown mechanically coupled to a transmission 140, and the transmission 140 is mechanically coupled to the rear axle 190. The drive energy source 120 can supply the transmission 140 with mechanical energy.The rear axle 190 can receive mechanical energy from the transmission 140 so that the mechanical energy can be transmitted to the rear wheels 103.
[0013] The rear axle 190 has two half-shafts, including a first or right half-shaft 190a and a second or left half-shaft 190b. The rear axle 190 may be an integrated axle that includes a differential gear set 191. The differential gear set 191 may be open when the vehicle 100 is traveling on roads or cornering, allowing the right rear wheel to rotate at a different speed than the left rear wheel. The differential gear set 191 allows the vehicle 100 to turn without dragging a right rear wheel or a left rear wheel, respectively.
[0014] The vehicle 100 includes the controller 144, and the controller 144 has a read-only memory (ROM or non-volatile memory) 114, a random access memory (RAM) 116, a digital processor or central processing unit (CPU) 160, and inputs and outputs (I / O) 118 (e.g., digital inputs including counters, timers, and discrete inputs, digital outputs, analog inputs, and analog outputs). The controller 144 can receive signals from the sensors 154 (including the transmission output shaft speed sensors 186, the power source temperature sensors, the wheel speed sensors 185, the power source speed sensors 187, etc.) and provide control signal outputs to the actuators 156 (including the power source torque actuators, the axle lock actuators, etc.). The controller 144 can be connected to the instrument panel orthe instrument panel 130, the propulsion energy source 120, external controllers, external servers, and other controllers, if present.
[0015] The vehicle 100 may also include an instrument panel 130 with which the human operator can interact. The instrument panel 130 may include an interactive navigation system 134 that generates and displays driving routes upon command from a user input. The instrument panel 130 may further include a display system 132 configured to display information to the vehicle operator. The display system 132 may include, as a non-limiting example, a touchscreen or a human-machine interface (MMI) that allows the vehicle operator to view graphical information as well as input commands. In some examples, the display system 132 may be wirelessly connected to the internet (not shown) via the controller 144.Thus, in some examples, the vehicle operator may communicate with a website or a software application (app) and the controller 144 via the display system 132. The instrument panel 130 and devices contained therein may be powered by a battery 139. The battery 139 may also supply power to the controller 144 and a starter motor (not shown) for the propulsion energy source 120.
[0016] The instrument panel 130 may also include a user interface 136 through which the vehicle operator can adjust the operating state of the vehicle. In particular, the user interface 136 may be configured to initiate and / or terminate operation of the vehicle powertrain (e.g., the motive power source 120) based on user input. Various examples of the user interface 136 may include interfaces that utilize a physical device, such as an active key, that can be inserted into the user interface 136 to activate the motive power source 120 and turn on the vehicle 100, or that can be removed to deactivate the motive power source 120 and turn off the vehicle. The spatial orientation of the vehicle 100 and the vehicle axes is indicated via the axes 176.
[0017] Now referring to Fig. 2 shows a block diagram 200 including a HIL system 202 for evaluating a real-time controller. In this example, a controller 144 is electrically coupled to the HIL system 202 to evaluate whether or not the controller 144 meets real-time control standards and objectives.
[0018] The HIL system 202 includes a first simulation model 204 formed from a first computer core (e.g., a computer processor) 206 with a random access memory 206a and a read-only memory 206b. The first simulation model 204 and the first computer core 206 may be connected to one or more modules (e.g., 208, 210, 222, and 224). The modules (e.g., 208, 210, 222, and 224) may contain software (e.g., executable code) and / or hardware.
[0019] The modules of the first simulation model 204 include a control model 208, a scheduler 210, a nominal bus communication channel 222, and a BSP layer module 224. The HIL system 202 includes a real-time operating system that schedules the control model 208 (e.g., a first model) and the physical system model 244 (e.g., a second model). The HIL system 202 can be used to verify that the device under test (e.g., the controller 144) conforms to its operating specifications. The control model 208 of the HIL system 202 has the task of checking whether the device under test meets its operating specifications, but the execution of the algorithm of the physical model 244 must not disturb or impair the real-time operation of the control model 208 so that a suitable verification or check of the device under test can be achieved.
[0020] The first simulation model 204 can communicate with the device under test via a Board Support Package (BSP) layer 224, which can contain software device drivers. The BSP layer 224 can contain a CAN (Controller Area Network) bus and analog signals. The BSP layer 224 has only one interface to the control model 208. The BSP layer 224 enables external access from the control model 208 to the device under test (e.g., the controller 144). The control model 208 is executed according to a trigger signal provided via the scheduler 210. The control model 208 can perform a variety of functions or actions, including, but not limited to, simulating a controller (e.g., a transmission or engine controller), organizing input and output data, and exchanging data with the physical system model 244.The control model 208 can facilitate the exchange of digital and analog signals between the HIL system 202 and the controller 144.
[0021] The HIL system 202 includes a second simulation model 240, which is formed from a second processor core 242 with a random access memory 242a and a read-only memory 242b. The second simulation model 240 and the second processor core 242 can be connected to one or more modules (e.g., 244-246). The modules (e.g., 204-224) can be formed from software (e.g., executable code) and / or hardware.
[0022] The modules of the second simulation model 240 include a physical system module 244 and a scheduler 246. The physical system module 244 may be an algorithm that models a physical system. The algorithm may be as simple as a lookup table referenced by one or more inputs (e.g., driver demand) and outputting an operating state of a physical system (e.g., engine torque). Alternatively, the algorithm may include multiple inputs processed through a linear or nonlinear model, and the model generates outputs to simulate the physical system.
[0023] The controller 144 is illustrated with a BSP layer 232 and a system monitoring section 234. The system monitoring module 234 may be included in a second processor core of the controller 144. The controller 144 also includes a nominal control module 236 included in a first processor core of the controller 144.
[0024] In this example, a speed sensor emulation circuit 250 is provided that is external to the HIL system 200, but in other examples, the emulation circuit 250 may be integrated into the HIL system 200. The speed sensor emulation circuit 250 may be configured as shown in Fig. 3. The speed sensor emulation circuit 250 may receive a digital voltage signal (e.g., a signal carrying data or information that is a function of a voltage level or value of the signal) from the HIL system 200 and output a current signal (e.g., a signal carrying data or information that is a function of a current level or value of the signal) to the controller 114.
[0025] In Fig. Figure 3 shows an example of a speed sensor emulation circuit 250 for a HIL system. The speed sensor emulation circuit 250 is configured to emulate the operation of a speed sensor that can monitor and display the speed of a wheel, pinion, shaft, or other rotating device. The emulated speed sensor may be configured with a current output. A current output may be desirable in systems where electrical and electromagnetic noise can affect sensors that output a voltage. Speed sensors with a current output can control the current in a current loop (e.g., a cable running from the speed sensor to a measurement circuit and returning to the speed sensor) to achieve a better signal-to-noise ratio.Since the circuit is a single-loop circuit, the current flow at the sensor is essentially equal to the current flow at the receiver (e.g., the controller 114), thereby achieving a better signal-to-noise ratio.
[0026] In this example, the speed sensor emulation circuit 250 includes two output channels CH A and CH B. Each of the output channels provides a pulse width modulated current output as shown in the Fig. 6 and Fig. 7. Based on the output of the two channels, it can be determined whether the monitored device (e.g., wheel, shaft, gear, etc.) is rotating clockwise or counterclockwise. The sensor emulation circuit 250 includes a first D-type flip-flop 304, a second D-type flip-flop, a first voltage-controlled current source 308, a second voltage-controlled current source 310, and an inverter 302.
[0027] The speed sensor emulation circuit 250 also includes a plurality of inputs SA (first D flip-flop set input), SB (second D flip-flop set input), RA (first D flip-flop reset input), RB (second D flip-flop reset input), and CLK AB (clock input). The first flip-flop 304 includes a set input (S), a reset input (R), a clock input (CLK), a data input (D), a first output (Q), and a second output (Q̅). The Q̅ output is the inverse of the Q output. Similarly, the second flip-flop 306 includes a set input (S), a reset input (R), a clock input (CLK), a data input (D), a first output (Q), and a second output (Q̅). The output Q̅ of each D flip-flop is electrically coupled directly to its D input. The circuit input SA is electrically coupled directly to the S input of the first flip-flop 304.The circuit input SB is directly electrically coupled to the S input of the second flip-flop 306. The circuit input RA is directly electrically coupled to the R input of the first flip-flop 304. The circuit input RB is directly electrically coupled to the R input of the second flip-flop 306. The circuit output Q of the first flip-flop 304 is directly electrically coupled to the input 308a of the voltage-controlled current source 308. The output 308b of the voltage-controlled current source 308 is directly electrically coupled to the output CH A. The circuit output Q of the second flip-flop 306 is directly electrically coupled to the input 310a of the voltage-controlled current source 310. The output 310b of the voltage-controlled current source 310 is directly electrically coupled to the output CH B. The clock input CLK AB is directly electrically coupled to the clock input CLK of the first flip-flop 304 and the input 302a of the inverter 302.The output 302b of the inverter 302 is input to the clock input CLK of the second flip-flop 306. The first flip-flop 304 and the second flip-flop 306 can be configured as shown in the truth table of . Fig. 4 and the sequences of Fig. 6 and Fig. 7 shown work.
[0028] The system of Fig. 1-3 provides a sensor emulation system comprising: a first memory device configured to receive a signal at a clock input of the first memory device and to provide a first voltage output to a first voltage-controlled current source; and a second memory device configured to receive an inversion of the signal at a clock input of the second memory device and to provide a second voltage output to a second voltage-controlled current source. In a first example, the sensor emulation system includes the first memory device and the second memory device being D-memory devices. In a second example, which may include the first example, the sensor emulation system includes the first memory device including a first D-input and a first Q̅-output.In a third example, which may include one or both of the first and second examples, the sensor emulation system includes the second memory device including a second D input and a second Q̅ output. In a fourth example, which may include one or more of the first to third examples, the sensor emulation system includes the first Q̅ output electrically coupled to the first D input. In a fifth example, which may include one or more of the first to fourth examples, the sensor emulation system includes a second Q̅ output electrically connected to the second D input. In a sixth example, which may include one or more of the first to fifth examples, the sensor emulation system further includes a first S input and a first R input on the first memory device and a second S input and a second R input on the second memory device.In a seventh example, which may include one or more of the first to sixth examples, the sensor emulation system comprises a hardware-in-the-loop system that generates the signal and includes outputs connected to the first S input, the first R input, the second S input, and the second R input.
[0029] The system of Fig. 1-3 also provides a hardware-in-the-loop (HIL) system with sensor emulation, comprising: an HIL system coupled to a device under test; a first memory device configured to receive a signal from the HIL system at a clock input of the first memory device and to provide a first voltage output to a first voltage-controlled current source; and a second memory device configured to receive an inversion of the signal at a clock input of the second memory device and to provide a second voltage output to a second voltage-controlled current source. In a first example, the HIL system further comprises a device under test connected to the system.In a second example, which may include the first example, the HIL system further includes a first digital output of the HIL system that generates the signal, and additional digital outputs of the HIL system that generate an output to a first memory device S input, a first memory device R input, a second memory device S input, and a second memory device R input. In a third example, which may include one or both of the first and second examples, the HIL system includes the first voltage-controlled current source connected to the device under test. In a fourth example, which may include one or both of the first through third examples, the HIL system includes a second voltage-controlled current source connected to the device under test.
[0030] In Fig. 4 is an example truth table 402 for the D flip-flops of Fig. 3. The truth table 402 is divided into rows 406 and columns 404. The columns contain columns for inputs (CLK, D, R, S) and outputs (Q and Q). The rows contain space for the inputs to the various flip-flop inputs and outputs. The "rise" entry refers to a state in which a signal applied to the flip-flop's clock input CLK transitions from a lower voltage (e.g., zero volts) to a higher voltage (e.g., 5 volts). The "fall" entry refers to a state in which the signal applied to the flip-flop's clock input CLK transitions from a higher voltage to a lower voltage. The higher voltage can also be referred to as a logic 1 or true, and the lower voltage as a logic 0 or false. The entry “X” means “doesn’t matter”, ie the input can be a logical 0, a logical 1 or any other value that has no effect on the flip-flop output.
[0031] The truth table 402 can be read as follows: The first row 410 indicates that when the logic zero level voltages are input to the D, R and S inputs of the flip-flop, the output Q will be a logic 0 (false) and the output Q̅ will be a logic 1 (true) when the signal input to the clock input (CLK) transitions from a low level (e.g., 0) to a high level (e.g., 1). Similarly, the second line 412 indicates that the Q output will be a logic 1 (true) and the Q̅ output will be a logic 0 (false) when logic zero voltages are applied to the R and S inputs of the flip-flop, and a logic 1 voltage is applied to the D input of the flip-flop when the signal applied to the clock input (CLK) transitions from a low level (e.g., 0) to a high level (e.g., 1). The remaining lines can be read in a similar manner.
[0032] The first flip-flop 304 has the CLK signal as its input. Therefore, it can toggle and maintain the logic output value on the rising edge of the input signal. The second flip-flop 306 has the inverse of the clock signal CLK as its input for synchronization purposes, since both input signals are generated by the same clock. This means that the second flip-flop toggles and maintains the logic output value on the falling edges of the clock signal or on the rising edges of the inverse clock signal. When the clock input CLK receives a rising edge (a voltage transition from a low voltage to a high voltage), the current state of the data input is stored in the circuit, and the flip-flop output terminal Q reflects the current state of the data input D. The output Q̅ is the inverse state of the output Q.Input D is connected to the complementary output Q̅ of both flip-flops, allowing a desired square wave to be generated. A phase shift exists between the square wave outputs of the two flip-flops, which is proportional to the duty cycle (DC) of the input frequency signal. This is because the first flip-flop 304 and the second flip-flop 306 are triggered by the opposite edges of the pulse-width modulated signal applied to the CLK inputs. Since pulse-width modulation has a period T, the rising and falling edges are defined by T. * DC separated, and the two output square waves also have a period of 2 * T (since the flip-flop divides the input frequency by two) and are divided by 2 * T *DC disconnected. Finally, the set input S for the flip-flops is used to set the output to a high state, regardless of the input at the D input and CLK input. The reset input R of the flip-flops is used to reset the output Q to a low state, regardless of the input at the D input and CLK input. The set and reset states are tied to an appropriate logic voltage level (e.g., low 0 or high 1). The HIL system provides digital outputs that are input to the D, S, and R inputs. However, the D, R, and S terminals can be used to establish a defined start condition and generate sensor anomalies. For example, if one of the sensors fails, it can provide a constant logic level at its output. A constant voltage level can be applied to the CLK input to see how the device under test responds.
[0033] Fig. Figure 5 shows a top view of a speed sensor 506 whose current output is accelerated to detect wheel speed. The wheel 502 is shown with a plurality of teeth 504. The wheel 502 can rotate clockwise, as indicated by CW. The wheel 502 can also rotate counterclockwise, as indicated by CCW. Movement of the teeth 504 by the speed sensor 506 can cause a change in the state of the output signal of the speed sensor 506.
[0034] The sequence 600 in Fig. Figure 6 shows the behavior of the speed sensor emulation circuit 250 when the emulated speed sensor indicates a clockwise rotation. Fig. The sequence shown in Figure 6 can be Fig. 3 shown circuit in cooperation with the method of Fig. 8 can be generated.
[0035] The first representation from above in Fig. Figure 6 is a representation of a clock signal output by the HIL system. The clock signal is a signal with a voltage level that changes depending on the speed of an emulated rotating device. In another, in Fig. In the example not shown in Figure 6, if the emulated rotating device is a 60-tooth motor speed sensor rotating at 1000 rpm, the HIL system can generate a pulse width signal alternating between a logic 0 and a logic 1 with a 50% DC current at a frequency of 1000 Hertz. Fig. In Figure 6, the logic voltage levels 1 and 0 are plotted along the vertical axis. The horizontal axis represents time, and time increases from the left to the right side of the curve.
[0036] The second curve from the top in Fig. Figure 6 is a graph showing the CH A current output of speed sensor emulation circuit 250. The operating state of the Q output of the first flip-flop (e.g., flip-flop A) corresponds to the output state of CH A, but the output state of the Q output of the first flip-flop is a voltage, while the output state of speed sensor emulation circuit 250 CH A is an electric current. The vertical axis represents the electric current-based logic level or state for CH A of speed sensor emulation circuit 250 as a function of time. The vertical axis indicates the logic current levels 1 and 0. The horizontal axis represents time, and time increases from the left to the right side of the graph. The Set S and Reset R inputs of the first flip-flop and the second flip-flop are held at a logic 0 level during this sequence (not shown).
[0037] The third curve from the top in Fig. Figure 6 shows the CH B current output of the speed sensor emulation circuit 250. The operating state of the Q output of the second flip-flop (e.g., flip-flop B) corresponds to the output state of CH B, but the output state of the Q output of the second flip-flop is a voltage, while the output state of the speed sensor emulation circuit 250 CH B is an electric current. The vertical axis represents the electric current-based logic level or state for CH B of the speed sensor emulation circuit 250 as a function of time. The vertical axis indicates the logic current levels 1 and 0. The horizontal axis represents time, and time increases from the left to the right side of the curve.
[0038] At time t0, the clock signal CLK is at a logic 0 level. CH A and CH B are also at logic 0. At time t1, a rising edge 602 of the CLK signal, as indicated by an upward arrow, shows a transition from a low voltage level (logic 0) to a higher voltage level (logic 1). This causes flip-flop A of the speed sensor emulation circuit 250 to transition from a low state (logic 0) to a higher state (logic 1), causing the output CH A of the speed sensor emulation circuit 250 to change the electrical current level from a lower level (logic 0) to a higher level (logic 1). The output CH B remains unchanged because it can change its state in response to a falling edge of the CLK signal.
[0039] At time t2, a falling edge 604 of the CLK, as indicated by a downward arrow, indicates a transition from a higher voltage level (logic 1) to a lower voltage level (logic 0). This causes the second flip-flop of the speed sensor emulation circuit 250 to transition from a low state (logic 0) to a higher state (logic 1), causing the CH B output of the speed sensor emulation circuit 250 to change the electrical current level to transition from a lower level (logic 0) to a higher level (logic 1). The CH A output remains unchanged because it can change state in response to a rising edge of the CLK signal. Because the CH A and CH B outputs can change due to different clock edges, a phase delay is created, indicated by the time specified at 605.The output CH A is ahead of the output CH B in time (the time increases from the left to the right side of the graph), which may indicate that the device is running clockwise.
[0040] The duty cycle of the CLK signal can be used to adjust the phase shift between CH A and CH B specified at 605. Additionally, the CLK signal can be used to emulate difficult speed sensor operating conditions by creating a larger phase shift between CH A and CH B. In other words, the distance 605 can be extended relative to time t1 and time t3 to simulate sensor-specific conditions. For example, sensitive elements of speed sensors (e.g., metal strips in Hall-effect sensors) are mounted with a mechanical offset of 90° to ensure optimal performance. However, due to mechanical limitations, this setup is not always possible, and a non-optimal angle for the metal strips may be used.The suboptimal angle reduces the sensor's ability to detect direction at higher speeds, which impairs the speed sensor's performance. The present invention allows for the simulation of suboptimal mechanical angles for the speed sensor by adjusting the phase shift between CH A and CH B. This allows for the emulation of difficult operating conditions of the speed sensor coupled to the controller by adjusting the phase shift at the limit of the permissible mounting angle.
[0041] At time t3, another rising edge of CLK occurs, causing the first flip-flop of speed sensor emulation circuit 250 to transition from the higher state (logic 1) to the lower state (logic 0), causing the CH A output of speed sensor emulation circuit 250 to change the electrical current level to transition from the higher level (logic 1) to the lower level (logic 0). The CH B output remains unchanged because it can change its state in response to a falling edge of the CLK signal.
[0042] At time t4, a falling edge of CLK causes the second flip-flop of the speed sensor emulation circuit 250 to transition from the higher state (logic 1) to the lower state (logic 0), causing the CH B output of the speed sensor emulation circuit 250 to change the electrical current level from the higher level (logic 1) to the lower level (logic 0).
[0043] The first and second flip-flops provide an output signal at half the frequency of the CLK input signal and two signals with different phases to enable simulation of the rotation direction using a single signal (CLK). Because the CH A and CH B signals are generated from a single signal (CLK), errors in generating two phase-shifted signals with precise timing via the HIL system can be avoided.
[0044] The sequence 700 in Fig. Figure 7 shows the behavior of the speed sensor emulation circuit 250 when the emulated speed sensor indicates a change in the direction of rotation. Fig. The sequence shown in Figure 7 can be Fig. 3 shown circuit in cooperation with the method of Fig. 8 can be generated.
[0045] The first representation from above in Fig. Figure 7 is a diagram of a clock signal output by the HIL system. The clock signal is a signal with a voltage level that changes depending on the speed of an emulated rotating device. In this example, the HIL system generates a pulse-width signal that alternates between logic 0 and logic 1 with a 50% DC current. The logic voltage levels 1 and 0 are indicated on the vertical axis. The horizontal axis represents time, and time increases from the left to the right side of the curve.
[0046] The second curve from the top in Fig. Figure 7 is a graph showing the CH A current output of speed sensor emulation circuit 250. The vertical axis represents the electrical current-based logic level or state for CH A of speed sensor emulation circuit 250 versus time. The vertical axis represents the logic current levels 1 and 0. The horizontal axis represents time, and time increases from the left to the right side of the graph.
[0047] The third curve from the top in Fig. Figure 7 shows the CH B current output of the speed sensor emulation circuit 250. The vertical axis represents the electrical current-based logic level or state for CH B of the speed sensor emulation circuit 250 as a function of time. The vertical axis indicates the logic current levels 1 and 0. The horizontal axis represents time, and time increases from the left to the right side of the curve.
[0048] The fourth curve from the top in Fig. Figure 7 shows the set input (SA) of flip-flop A of the speed sensor emulation circuit 250. The vertical axis shows the logic 1 and 0 voltage levels for the set input of flip-flop A. The horizontal axis represents time, and time increases from the left side of the graph to the right side of the graph.
[0049] The fifth curve from the top in Fig. Figure 7 is a graph showing the reset input (RA) of flip-flop A of speed sensor emulation circuit 250. The vertical axis shows the logic voltage levels 1 and 0 for the reset input of flip-flop A. The horizontal axis represents time, and time increases from the left side of the graph to the right side of the graph.
[0050] The sixth curve from the top in Fig. Figure 7 is a graph showing the set input (SB) of flip-flop B of speed sensor emulation circuit 250. The vertical axis shows the logic voltage levels 1 and 0 for the set input of flip-flop B. The horizontal axis represents time, and time increases from the left side of the graph to the right side of the graph.
[0051] The seventh curve from the top in Fig. Figure 7 shows the reset input (RB) of flip-flop B of speed sensor emulation circuit 250. The vertical axis shows the logic 1 and 0 voltage levels for the reset input of flip-flop B. The horizontal axis represents time, and time increases from the left side of the graph to the right side of the graph.
[0052] The speed sensor emulation circuit 250 includes two flip-flops that respond to opposite edges of the CLK signal. For a CLK signal with a period of T seconds, CH A and CH B have a phase shift of 2 - T - DC, where DC is the duty cycle. The speed sensor output depends on the orientation of the speed sensor. When the speed sensor is oriented in a first manner, the controller 144 detects the direction of rotation of a rotating device based on the logic level of CH B at the moment CH A has a rising edge (e.g., the moment CH A transitions from a low level to a high level). Therefore, there are two possibilities: If CH B is high, rotation is clockwise; if CH B is low, rotation is counterclockwise. The opposite may be true if the speed sensor is oriented differently.However, it is important to start with a known initial state of the internal states and outputs of the flip-flops Q and Q̅ to correctly emulate the reversal of the rotation direction. Therefore, the set and reset input ports of the two flip-flops can be controlled.
[0053] At time t10, the clock signal CLK, the set input for the first flip-flop (e.g., flip-flop A), the reset input for the first flip-flop (e.g., flip-flop A), the set input for the second flip-flop (e.g., flip-flop BA), and the reset input for the second flip-flop (e.g., flip-flop B) are at logic 0 levels. CH A and CH B are also at logic 0.
[0054] At time t11, a rising edge 702 of the CLK, as indicated by an upward arrow, shows a transition from a low voltage level (logic 0) to a higher voltage level (logic 1). This causes the first flip-flop of the speed sensor emulation circuit 250 to transition from a low state (logic 0) to a higher state (logic 1), causing the CH A output of the speed sensor emulation circuit 250 to change the electrical current level to transition from a lower level (logic 0) to a higher level (logic 1). The CH B output remains unchanged because it can change its state in response to a falling edge of the CLK signal. The set input for the first flip-flop, the reset input for the first flip-flop, the set input for the second flip-flop and the reset input for the second flip-flop should remain at logic 0 levels.
[0055] At time t12, a falling edge 704 of the CLK, as indicated by a downward arrow, shows a transition from a higher voltage level (logic 1) to a lower voltage level (logic 0). This causes the second flip-flop of the speed sensor emulation circuit 250 to transition from a low state (logic 0) to a higher state (logic 1), causing the CH B output of the speed sensor emulation circuit 250 to change the electrical current level to transition from a lower level (logic 0) to a higher level (logic 1). The CH A output remains unchanged because it can change state in response to a rising edge of the CLK signal. The CH A output precedes the CH B output in time (time increases from the left to the right side of the graph), which may indicate that the device is running clockwise.
[0056] At time t13, the duty cycle of the CLK signal is reduced to zero to prepare for emulating a change in the direction of rotation of the emulated rotating device (e.g., gear, etc.). CH A is high, and CH B transitions from low to high. The set and reset inputs of the individual flip-flops are at lower levels.
[0057] At time t14, the set input of the first flip-flop and the reset input of the second flip-flop are toggled from low to high. The reset input of the first flip-flop and the set input of the second flip-flop are held low. During the time interval between t14 and t15, as shown at 706, the internal states of the first and second flip-flops are forced into known states. Specifically, the output of the first flip-flop drives CH A to a high level and the output of the second flip-flop drives CH B to a low level, while CLK is low.
[0058] At time t15, the duty cycle of the CLK signal changes from zero to a non-zero value, causing CH A to transition from the higher to the lower level. CH B remains unchanged, and the Set A and Reset B signals transition from higher to lower levels.
[0059] At time t16, the CLK signal transitions to a lower level, and the falling edge of the CLK signal causes CH B to transition from a low state to a high state. CH A remains unchanged, and the set and reset inputs of the two flip-flops remain at lower levels. Thus, the rising edge of CH B precedes the rising edge of CH A, indicating a change in direction of the emulated rotary device.
[0060] For example, the present system can simulate a change in rotation direction by applying a logic one (e.g., high level) to the S and R inputs of the first and second flip-flops of the speed sensor emulation circuit 250. The HIL system can determine whether the controller detects the change in rotation direction or not, as this is expected.
[0061] In Fig. Figure 8 shows a state machine diagram of a method for generating signals to simulate a speed sensor with current output of a HIL system. The state machine and the method of Fig. 8 may be implemented at least partially as executable instructions stored in the memory of the controller in the systems of Fig. 1-3 are stored. In addition, the state machine and the procedure of Fig. 8 actions that are performed in the physical world to change the operating states of the system from Fig. 1-3 to change.
[0062] Block diagram 800 includes a state machine 802, a pulse width modulation generator 804, a speed sensor emulation circuit 250, and an analog input block 806. The state machine 802 can be implemented via control software and provides two outputs (e.g., duty cycle and period) to the pulse width modulation generator 804. The state machine 802 also provides the digital outputs Set A, Set B, Reset A, and Reset B to the speed sensor emulation circuit 250. The speed sensor emulation circuit 250 provides the outputs CH A and CH B to the inputs of the state machine 802. The state machine 802 also includes inputs for the rotational frequency of the emulated device (e.g., a wheel with teeth), the frequency sign (indicating the direction of rotation), and thresholds. A more detailed description of the state machine 802 is provided in the description of Fig. 9 included.
[0063] In Fig. 9 shows a diagram 900 of the state machine 802. The state machine of Fig. 9 can be used with the system of Fig. 1-3 work together to determine the operating states of the system from Fig. 1-3 in the real world. The procedure of Fig. 9 may be implemented, at least in part, as executable instructions stored in the memory of the controller in the systems of Fig. 1-3 are stored.
[0064] The state machine 802 includes four states: Standstill, Moving, Start_fwd, and Start_rev. The state machine is entered via the initial condition Init, which calls the toStandstill function. The states can be reached when certain conditions are met, and actions can be triggered upon transitioning from one state to another. The arrows between the states and their conditional requirements (e.g., square brackets) and actions (e.g., curly brackets) are used to show conditions and actions upon transitioning from one state to another. The state machine 802 includes four functions 902-908. The to_Standstill function 902 is called during initialization. The to_Moving function 904 can be executed upon transitioning to the Moving state 926. The to_Forward function 906 can be executed upon transitioning to the Start_fwd state 924.The to_Reverse function 908 may be executed upon transition to the Start_rev state 920. The actions in these functions may be executed upon transitions between states. For example, the inputs of the speed sensor emulation circuit 250 may be set to Reset A = false, Reset B = false, Set A = false, and Set B = false when transitioning to the Move state 926.
[0065] For example, arrow 910 shows a transition from the Start_rev state 920 to the Move state 926. This transition can occur when CH A = 1 and CH B = 0. The actions in which the set input of the first flip-flop or flip-flop A is set to false, the set input of the second flip-flop or flip-flop B is set to false, the reset input of the first flip-flop is set to false, and the reset input of the second flip-flop is set to false are shown along the side of arrow 910.
[0066] The HIL system user can request the speed of a wheel or other rotating device that the HIL system should emulate as input to the speed sensor emulation circuit. If the absolute value of the state machine's input frequency exceeds the threshold parameter threshold_move, the state machine transitions to Start_rev (backward) or Start_fwd (forward), depending on the sign of the frequency. The state machine remains in one of these states until feedback from CH A and Ch B allows it to transition to the move state. In the move state, the state machine's input frequency is converted to a corresponding period, and the duty cycle is set to the value duty_mab_pct. For example, duty_mab_pct = 50% means that CH A and CH B are shifted by 90°.Frequency and duty cycle are then sent to the PWM generator, which produces the clock control signal for the speed sensor emulation circuit, as shown in . Fig. 8 shown.
[0067] The state machine can enter the standstill state when the absolute value of the input frequency falls below the threshold_stop. Note that threshold_move is set to a value greater than threshold_stop so that a hysteresis mechanism prevents the state machine from jumping back and forth between the standstill and move states when the input frequency is near either threshold.
[0068] During transitions from one state to another, one of the following functions is called: toReverse(), toForward(), toMoving(), toStandstill(). Each of these functions can assign a value to the set / reset signal for the flip-flop state of the speed sensor emulation circuit 250, thus ensuring a correct initial state (a well-known and defined state) before the clock signal begins toggling. In addition, there are two transitions from the moving state to Start_rev and Start_fwd, respectively, that can occur without passing through the standstill state. These transitions cover the case where the input frequency changes sign without the absolute value falling below threshold_stop (this can happen when the threshold is small and the integration step is large).
[0069] The state machine 802 can also be adapted to output certain values to the set and reset inputs of the speed sensor emulation circuit 250 to simulate speed sensor degradation. For example, a connection between the speed sensor output at CH A and the battery voltage can be emulated by setting the "Reset A" input of the speed sensor emulation circuit 250 to "true" or "logic one."
[0070] This way, the state machine of the Fig. 8 and Fig. 9 generate a clock signal CLK, set inputs, and reset inputs for a speed sensor emulation circuit. The state machine can also simulate forward and reverse rotation directions.
[0071] The procedure of Fig. 8 and Fig. 9 provides a method for simulating a current output speed sensor, comprising: providing a signal to the clock input of the first memory device and an inverse signal to a clock input of the second memory device; and supplying the output of the first memory device A to a first voltage-controlled current source and an output of the second memory device to a second voltage-controlled current source. In a first example, the method includes providing the signal via a hardware-in-the-loop system. In a second example, which may include the first example, the method includes connecting the first voltage-controlled current source and the second voltage-controlled current source to a device under test.In a third example, which may include one or both of the first and second examples, the method further comprises generating the signal via the hardware-in-the-loop system. In a fourth example, which may include one or more of the first to third examples, the method further comprises electrically coupling the S and R inputs of the first flip-flop to the hardware-in-the-loop system. In a fifth example, which may include one or more of the first to fourth examples, the method further comprises electrically coupling the S and R inputs of the second flip-flop to the hardware-in-the-loop system. In a sixth example, which may include one or more of the first to fifth examples, the method further comprises simulating a change of direction of a device by applying a logical true input to the S input of the first flip-flop and the R input of the second flip-flop.
[0072] In another representation, the procedure of Fig. 8 and Fig. 9 proposes a method for simulating a current output speed sensor, comprising: supplying a signal to a clock input of a first memory device and an inverse signal to a clock input of a second memory device; and supplying a first output of a first memory device to a first voltage-controlled current source and a first output of a second memory device to a second voltage-controlled current source, wherein the first memory device and the second memory devices are D-type flip-flops, and wherein a Q output of the first memory device is wired (e.g., directly electrically coupled) to a D input of the first memory device. The method further comprises adjusting the signal levels supplied to the S and R inputs of the first memory device via a hardware-in-the-loop system.
[0073] In Fig. 10 shows an example sequence that is transmitted via the system of Fig. 1-3 in cooperation with the procedure of Fig. 8 and Fig. 9 can be generated. The sequence in Fig. 10 emulates a short circuit of the CH B output to ground. The vertical and horizontal axes for the curves in Fig. 10 are the same as in Fig. 7. For the sake of brevity, a description of the individual plots is therefore omitted.
[0074] In this example, the sequence begins at time t20. All signals are at their lower levels, and the emulation of a ground fault to CH B is not shown.
[0075] At time t21, CLK transitions from low to high via 1002, and the CH A output transitions from low to high. The set and reset inputs of the speed sensor emulation circuit 250 are low.
[0076] At time t22, a short circuit of CH B to ground is emulated by holding CH B high. This is achieved by applying a high level (e.g., a logic 1) to the set input of the second flip-flop in the speed sensor emulation circuit 250. The CLK signal transitions to a low level, as indicated at 1004.
[0077] In Fig. 11 shows an example sequence that can be used with the system of Fig. 1-3 in cooperation with the procedure of Fig. 8 and Fig. 9 can be generated. The sequence in Fig. 11 emulates a short circuit of the CH A output with the battery voltage. The vertical and horizontal axes for the curves in Fig. 11 are the same as in Fig. 7. For the sake of brevity, a description of the individual plots is therefore omitted.
[0078] In this example, the sequence begins at time t30. All signals are at their lower levels, and the emulation of a battery voltage short circuit to CH A is not shown.
[0079] At time t31, CLK transitions from low to high, as indicated in 1102, and the CH A output transitions from low to high. The set and reset inputs of the speed sensor emulation circuit 250 are low.
[0080] At time t32, a short circuit of CH A to the battery voltage is emulated by keeping CH A high. This is achieved by applying a high level (e.g., a logic 1) to the reset input of the first flip-flop (in the speed sensor emulation circuit 250).
[0081] In Fig. 12 shows an example sequence that can be used with the system of Fig. 1-3 in cooperation with the procedure of Fig. 8 and Fig. 9 can be generated. The sequence in Fig. 12 emulates the intermittent degradation of a speed sensor. The vertical and horizontal axes for the curves in Fig. 12 are the same as in Fig. 7. For the sake of brevity, a description of the individual plots is therefore omitted.
[0082] In this example, the sequence begins at time t40. All signals are at their lower levels, and the emulation of intermittent speed sensor degradation is not displayed.
[0083] At time t41, CLK transitions from low to high, as indicated at 1202, and the CH A output transitions from low to high. The set and reset inputs of the speed sensor emulation circuit 250 are low.
[0084] At time t42, intermittent degradation of the CH A output is emulated by toggling the reset input of the first flip-flop of the speed sensor emulation circuit 250. This causes the CH A output to toggle with the rising and falling edges of the CLK signal as the CLK signal transitions between high and low levels.
[0085] This description illustrates how two D flip-flops (e.g., storage devices), two voltage-controlled current sources, and executable instructions stored in non-transitory memory can form a basis for emulating a current-output speed sensor. However, it should be understood that JK flip-flops, reset / set flip-flops, binary storage devices, and other storage devices can be arranged and configured to simulate a current-output speed sensor without departing from the scope or intent of this description.
[0086] It will be understood that the configurations and routines disclosed herein are exemplary in nature, and that these specific examples are not to be considered in a limiting sense, as many variations are possible. For example, the foregoing technology can be applied to drive trains that include various types of drive sources, including various types of electric machines and transmissions. The subject matter of the present disclosure encompasses all novel and non-obvious combinations and sub-combinations of the various systems and configurations, as well as further features, functions, and / or properties disclosed herein.
[0087] The following claims particularly point out certain combinations and sub - combinations which are considered novel and non - obvious. These claims may refer to “an” element or “a first” element or the equivalent thereof. Such claims can be understood to include the incorporation of one or more such elements, where two or more such elements are neither required nor excluded. Further combinations and sub - combinations of the disclosed features, functions, elements and / or properties may be claimed by amending the present claims or by filing new claims in this or a related application. Such claims, whether broader, narrower, of the same or of different breadth than the original claims, are also considered to be included within the subject matter of the present disclosure.
Claims
[1] Sensor emulation system, comprising: a first memory device configured to receive a signal at an input of the first memory device and to provide a first voltage output to a first voltage-controlled current source; and a second memory device configured to receive an inversion of the signal at an input of the second memory device and to provide a second voltage output to a second voltage-controlled current source. [2] A sensor emulation system according to any one of the preceding claims, wherein the first memory device and the second memory device are D-flip-flops, wherein the input of the first memory device is a clock input and wherein the input of the second memory device is a clock input. [3] The sensor emulation system of claim 1, wherein the first memory device has a first D input and a first Q output. [4] The sensor emulation system of claim 3, wherein the second memory device has a second D input and a second Q output. [5] The sensor emulation system of claim 4, wherein the first Q output is electrically coupled to the first D input. [6] The sensor emulation system of claim 5, wherein the second Q output is electrically coupled to the second D input. [7] A sensor emulation system according to any one of the preceding claims, further comprising a first S input and a first R input on the first memory device and a second S input and a second R input on the second memory device. [8] The sensor emulation system of claim 7, wherein a hardware-in-the-loop system generates the signal and includes outputs coupled to the first S input, the first R input, the second S input, and the second R input.
