3.1. Main Loop of the Control Algorithm
Sensor inputs for the control algorithm are processed by code in the main loop (in the National Instruments—NI 3110 hardware) or in the Field Programmable Gate Array—FPGA (NI 9159) for fast processing. In the main loop, the control algorithm decides the system response to the current situation. This loop contains sub functions with a period of 10 ms. This loop is a summary of the main functions of the control algorithm and it decides whether all-wheel drive will be activated or the relevant differentials will be locked. The control algorithm inputs include wheel speeds, steering angle, the shaft speed difference of a locked dog clutch, vehicle velocity, actuator feedback, pedal signals, vehicle braking status, pneumatic circuit pressure, engine torque, switches and button signals, and driving mode setting. The control algorithm inputs are evaluated from sensors, CAN messages from other ECU, control switches and the button, and touch display information. These are shown in
Figure 3.
The basic function of the system is the evaluation of the slip of the wheels and shafts. Therefore, the following equation is used to evaluate the slip:
where
omg is the speed of the respective wheels or shafts,
i is the index of the respective slip or the correction slip,
j and
k are the wheel or shaft indexes, and
slipC is the correction slip. If the function max is equal to 0, it is treated to prevent division by zero. The resulting slip is compared to the slip control parameter. If the slip value is higher than the control parameter, the control algorithm responds to this situation. For the slip evaluation, it is necessary to monitor the wheel speed values. Wheel speed values are monitored using two approaches: From the CAN message (Parameter Group Number: 0xFEBF), the wheel speed (km/h) information is read. These messages are sent by an ABS system, but only for four wheels. This means that the values from the CAN message have to be converted to wheel speed
omg (rpm). Therefore, wheel circumference is defined and is recalculated to wheel radius for the subsequent processing of wheel speed. The dependence of the wheel radius on the load or its wear is included in the control algorithm, so the slip control parameter must be set with sufficient margin. This means that if a slip is evaluated due to the different radii of the wheels, there is no locking of the differentials or activation of all-wheel drive. Other wheels are equipped with other speed sensors. Their signal is monitored and evaluated in the FPGA code. Both approaches obtain the speed:
omgFLI—the left wheel speed of the first front axle of the vehicle;
omgFRI—the right wheel speed of the first front axle of the vehicle;
omgFLII—the left wheel speed of the second front axle of the vehicle;
omgFRII—the right wheel speed of the second front axle of the vehicle;
omgRLI—the left wheel speed of the first rear axle of the vehicle;
omgRRI—the right wheel speed of the first rear axle of the vehicle;
omgRLII—the left wheel speed of the second rear axle of the vehicle; and
omgRRII—the right wheel speed of the second rear axle of the vehicle. The speed of the drive shafts are also calculated from these wheel speeds. The following is the use of Equation (1) for the slip calculation, where the results are:
sFLRI—the slip between the right and left wheels of the first front axle of the vehicle;
sFLRII—the slip between the right and left wheels of the second front axle of the vehicle;
sRLRI—the slip between the right and left wheels of the first rear axle of the vehicle;
sRLRII—the slip between the right and left wheels of the second rear axle of the vehicle;
sAIR—the slip between the output shafts of the rear inter-differential;
sAFRI—the slip between the input shaft of the first front axle and the output shaft of the transfer case; and
sAFRII—the slip between the input shaft of the second front axle and the output shaft of the transfer case.
The value of the steering angle is used for the evaluation of the correction slip and is applied in Equation (1). The principle is to evaluate the relative slip caused by turning the vehicle. For this purpose, Ackermann steering geometry is used. The value of the steering angle is also used for axle-differential lock limitation, where axle-differentials are unlocked when the steering angle limit is exceeded.
The shaft speed difference of a locked dog clutch is evaluated by the difference of the respective shaft speeds. These include: doFLRI—the speed difference between the output shafts of the axle-differential of the first front axle of the vehicle; doFLRII—the speed difference between the output shafts of the axle-differential of the second front axle of the vehicle; doRLRI—the speed difference between the output shafts of the axle-differential of the first rear axle of the vehicle; doRLRII—the speed difference between the output shafts of the axle-differential of the second rear axle of the vehicle; doAIR—the speed difference between the output shafts of the rear inter-differential; doAFRI—the speed difference between the input shaft of the first front axle and the output shaft of the transfer case; and doAFRII—the slip between the input shaft of the second front axle and the output shaft of the transfer case.
Vehicle speed vc is calculated from the minimum speed of all wheels when the vehicle is not braking. When the vehicle is braking, the vehicle speed is calculated from the maximum speed of all wheels.
In addition, the feedback switch value is monitored. This sensor is placed in all of the pneumatic cylinders, which are parts of the actuators. The sensor signals the actual activation of all-wheel drive or the locking of the relevant differentials. These include: FeedbackFAI—the input value of the algorithm sent by the actuator to get feedback on the activation of the first front axle drive; FeedbackFAII—the input value of the algorithm sent by the actuator to get feedback on the activation of the second front axle drive; FeedbackIR—the input value of the algorithm sent by the actuator to get feedback on the locking/unlocking of the rear inter-differential; FeedbackRI—the input value of the algorithm sent by the actuator to get feedback on the locking/unlocking of the axle-differential of the first rear axle of the vehicle; FeedbackRII—the input value of the algorithm sent by the actuator to get feedback on the locking/unlocking of the axle-differential of the second rear axle of the vehicle; FeedbackFI—the input value of the algorithm sent by the actuator to get feedback on the locking/unlocking of the axle-differential of the first front axle of the vehicle; and FeedbackFII—the input value of the algorithm sent by the actuator to get feedback on the locking/unlocking of the axle-differential of the second front axle of the vehicle.
Pedal signals are read from sensors or from CAN messages. These include: sigB—brake pedal signal; sigT—accelerator pedal signal; and sigC—clutch pedal signal. The variable sigB also includes the braking signals from the engine, the parking brake, and the retarder. If the value sigB is 1, the algorithm does not enable the activation of any actuator to maintain the stability of the vehicle.
The pressure value sigP is monitored for the evaluation of air pressure in the system circuit. This prevents damage to the mechatronic system if the pressure is out of range.
From the engine ECU, a CAN message is transmitted with the current engine torque value. Therefore, this value is processed and also used as the input value of the control algorithm. If the engine torque value is large, the control algorithm does not allow the locking of the relevant dog clutch in the actuators.
The driver uses three switches and one button to set the control algorithm. The first switch is used to set the automatic and manual control modes of the algorithm. The other two switches and the button are used to activate all-wheel drive and lock the rear inter-differentials, the rear axle-differentials, and the front axle-differentials in manual control mode.
Another option the driver has is to set up three control modes on the touch display for road, field and terrain/snow. Mode 1 is for road, mode 2 is for field roads, and mode 3 is for terrain/snow. The functions for setting the control parameters according to the selected user system modes in the algorithm are as follows.
Before the automatic or manual control mode function is running, the presence of system errors must be checked by using the error function, which will be described in more detail in the next section. The algorithm evaluates the response to the vehicle’s current behavior. Within the development, two approaches to the control algorithm were tested. One was partially independent and is described in [
14] and the other was dependent differential locking and is described here. This process is shown in
Figure 3. In this case, all-wheel drive and the locking of the inter-differentials are activated in the first phase (level 2/1). In the next phase, all rear axial differentials are locked (level 5/2), and all front axial differentials are locked in the final third phase (level 8/3). When the control algorithm loop is started, it is first decided whether there is a fault in the system. If there is a fault in the system, depending on its priority, the control algorithm is set to one of three options. The first state is that the control algorithm works in both manual and automatic mode. The second state occurs when the fault is more severe and the automatic control mode is significantly dependent on it. In this case, the system is switched to manual control mode regardless of the control mode set by the user. If the errors are considered very dangerous, the system is deactivated. If the system has no serious failure, it is controlled by the set value of the automatic or manual control switch set by the user.
In the case of manual control mode, differential locking occurs according to the left side of the diagram shown in
Figure 3. The diagram is divided into 4 levels. If the driver wants to activate all-wheel drive or lock the differential, the procedure is as follows. In the first stage, the driver presses the first switch on the dashboard and the algorithm changes the value
LockFAI-II and
LockIR to 1 (level 1) if the other checked variables of the engine torque and the speed difference between the shafts are below the limit. In the second stage, the driver presses the second switch and the algorithm changes the value
LockRI-II to 1 (level 2) if the checked variables of the engine torque, the speed difference between the shafts, and the feedback value are below the limit or have a value of 1. In the third stage, the driver presses the button and the algorithm changes the value
LockFI-II to 1 (level 3) if the conditions are met as in the previous stage. These speed differences and drive torque limits are applied for safety reasons, so that an inexperienced driver does not lock the differential in a dangerous situation which might lead to the destruction of the powertrain. The feedback value represents the actual state of all-wheel drive activation or individual differential locking. If the user wants to activate all-wheel drive or the differential lock, the feedback value must first be changed to 1. If the driver does not need to activate all-wheel drive or lock the differential, the driver uses the button and switches to level 0. In general, the user should set the automatic control mode by default. Manual control mode should only be used by the user if this is unavoidable or if the system indicates a fault.
Generally, if the arrows in the diagram (
Figure 3) are marked in red, the user moves up in the diagram. If the arrows are marked in blue, the user moves down in the diagram. This deactivates all-wheel drive and unlocks all the differentials. The black arrows mean movement up/down in the diagram. Green cells always show what should be locked or activated in the individual diagram position of the control algorithm.
The automatic control mode works according to right side of the diagram in
Figure 3. The status evaluation is based on speed difference values, engine torque, feedback of all-wheel drive and differential locking, brake pedal values, clutch pedal values, accelerator pedal values, system errors, mode setting (road, field, terrain/snow), wheel and shaft speeds, pneumatic circuit pressure, the slip between wheels or shafts, the steering angle of the front wheels, time, and the test time. Of course, the variables always have some limits or values for control and decision. These values are not being published because they are confidential.
The diagram of the automatic control mode is divided into 9 levels corresponding to the activation of the Lock FA—all-wheel drive, the lock of the respective differentials Lock R—Lock F, or intervals of waiting—Slip Up/Down.
General movement through the diagram is dependent on the setting of the control modes (road, field, terrain/snow). If the road mode is set, the diagram position of the control algorithm moves up to the maximum level of 2. If field mode is set, the diagram position of the control algorithm moves up to the maximum level of 5. The terrain/snow mode sets the control algorithm to move through the complete diagram.
In the first stage, all-wheel drive is deactivated and the individual differentials are unlocked (level 0).
If the vehicle wheels begin to slip under unfavorable adhesion conditions and the evaluated slip is above the specified limit, it is moved up to level 1 in the diagram of the control algorithm. At this stage, additional limits and conditions must be met: The accelerator pedal must be pressed, the speed difference must be less than the specified limit, the vehicle must not be braking, the vehicle velocity must be below the specified limits, the pneumatic pressure must be within the specified range, and the driving torque must be below the specified limit. It must not be braking in any way, which means that braking by a motor brake, a retarder, or a parking brake is also included in the braking variable sigB. The accelerator pedal value sigT must be 1 to move up to the higher level in the algorithm diagram. This means that if the driver presses the accelerator pedal, the input value sigT for the control algorithm is 1. Then, the algorithm knows that the potential slip of the wheels is justified. If the slip is evaluated and the accelerator pedal is 0, the algorithm cannot move to the next level. The vehicle velocity value vc determines whether the system can still be active to avoid locking the actuators at high vehicle speeds. The engine torque Te value is used for the protection of the powertrain against torque shocks. If everything is accomplished, the control algorithm moves up to Slip up FA (level 1). If any condition is not met, the position in the diagram moves down to level 0.
At level 1, the previous conditions and limits and the length of their duration is monitored. If this time is longer than the specified limit, the new condition is met and the diagram position moves up to level 2. The output signal LockFAI-II and LockIR is changed to 1 and sent to the actuator to activate all-wheel drive and to lock the rear inter-differential.
At level 2, if any condition is not met, the position in the diagram moves down to level 3. If the conditions for moving the position of the diagram are met, it changes immediately (level 2). If the conditions are not met, the position of the diagram moves down after the specified time.
Another way to move up to level 2 regards the algorithm monitoring the tilt angle of the vehicle along its transverse axis using gyroscopes and accelerometers. This function has a higher priority than the previous conditions. If the angle value is greater than the specified parameters, the position of the diagram moves up to level 2. This function of monitoring the tilt angle was deactivated during the prototype testing. An advantage of this function is the uniform distribution of the drive torque on all wheels, which means that individual shafts are not overloaded.
For a further move up to level 4 in the diagram, other conditions must be met. One is the limit for the steering angle of the wheels; if the steering angles DeltaFLI or DeltaFRI exceed the set limit, the algorithm does not enable a move up to level 4 to avoid damaging the powertrain. At level 4, the feedback value is also monitored. This means that the algorithm waits at the given position of the diagram until the individual feedback values Feedbacki are changed to 1, which means that the differentials are locked or all-wheel drive is activated. Thus, the drive torque is appropriately distributed throughout the powertrain, protecting it from damage. If the conditions are met, it moves up to level 4 in the diagram. If the conditions are not met, it moves down in the algorithm to level 3 and then to level 0, according to the conditions and the limits of the levels.
At level 4, the same conditions and limits as level 2 are monitored during the set timeout. If the conditions are met, it is moved up to level 5. If the conditions are not met, the position of the diagram moves down to level 2, and so on.
At level 5, the output signal LockRI-II is changed to 1 and sent to the actuator to lock the rear axle-differentials. In addition, the same conditions and limits are monitored with a different setting of control limit parameters. Therefore, according to the result of the evaluation of conditions and limits, the position in the diagram is moved down to level 6 or up to level 7. If unfavorable adhesion conditions persist, the diagram position moves up to level 8. This is the top level of the diagram.
At level 8, the output signal LockFI-II changes to 1 and is sent to the actuator to lock the front axle-differentials. All-wheel drive is activated and all the differentials are locked. At the same time, the algorithm does not know if wheel slip is still occurring. For this reason, the so-called test loop is programmed. If any conditions, errors, or limits do not specify that the diagram position moves down to level 5, it waits for the specified time interval and then it moves down to level 5. Subsequently, the slip is evaluated and if the slip continues, it moves up to level 8. If there is no slip, it continues to move down in the diagram. This assumes that the vehicle, as an example, has passed through muddy terrain and now the system reaction is no longer necessary. This movement in the diagram happens continuously according to actual adhesion conditions.