I begin with a practical engineering problem that matters to every electric car: maintaining a requested cruise speed smoothly when the road, load, and aerodynamic environment are not constant. In an electric car, the powertrain responds quickly, the torque command can be precise, and energy recovery can be coordinated with braking, so cruise control has a strong potential to improve comfort and efficiency. At the same time, a cruise controller must reject grade changes, wind gusts, passenger load, and road roughness without producing speed oscillations or excessive overshoot. I therefore focus on an electric car cruise control architecture that combines a classical PID loop with online fuzzy tuning, and I evaluate it against a fixed-parameter PID baseline.
The classical PID controller remains attractive for an electric car because it is simple, transparent, and easy to calibrate. However, a fixed-gain PID loop cannot remain optimal over the full operating envelope of an electric car. When the electric car climbs a long grade, the plant effectively gains a large disturbance; when it descends, regenerative braking changes the sign and magnitude of the control effort. A fixed PID loop may respond too slowly, or it may overreact and produce a speed overshoot. I designed a fuzzy PID supervisor that adjusts the proportional, integral, and derivative gains from the speed error and the error rate. The fuzzy supervisor does not replace the PID structure; it keeps the predictable PID core and adds an online adaptation layer that is easy to implement in a production electric car controller.

Electric Car Plant Model
I model the electric car from the torque command to the vehicle speed. I make three assumptions that are appropriate for cruise control design. First, the electric motor and the reduction gear are connected rigidly, so I neglect shaft compliance and backlash. Second, the longitudinal dynamics dominate, so I neglect lateral and yaw motion. Third, the motor torque response is approximated by a first-order lag, which captures the dominant electrical and control delay of the electric car powertrain. These assumptions keep the model identifiable from vehicle data while preserving the behavior that matters for cruise control.
I write the motor torque response as a first-order transfer function:
$$G_m(s)=\frac{T_l(s)}{U(s)}=\frac{1}{1+\tau s}$$
where U(s) is the requested motor torque, T_l(s) is the actual motor output torque, and tau is the equivalent first-order time constant. In the time domain I use:
$$\tau \frac{dT_l}{dt}+T_l=u$$
The reduction gear multiplies the motor torque to the drive shaft. With R as the reduction ratio, the drive-shaft torque is:
$$T_e=R\,T_l$$
For the electric car, the wheel speed and the motor speed are related by the wheel radius and the reduction ratio. If n is the motor speed in revolutions per minute, r_w is the wheel radius, and v is the vehicle speed, then:
$$v=\frac{2\pi r_w}{60R}n$$
I combine the electric car longitudinal force balance with the motor lag. The vehicle mass is m, the rolling resistance coefficient is f, the aerodynamic drag coefficient is C_d, the frontal area is A, the air density is rho, and the road grade angle is theta. The longitudinal equation is:
$$m\frac{dv}{dt}=\frac{T_e}{r_w}-mgf\cos\theta-\frac{1}{2}\rho C_d A v^2-mg\sin\theta$$
Substituting the motor and gear relations gives the nonlinear state model I use for the electric car cruise control study:
$$\dot v=\frac{R}{m r_w}T_l-gf\cos\theta-\frac{\rho C_d A}{2m}v^2-g\sin\theta$$
$$\dot T_l=\frac{1}{\tau}\left(u-T_l\right)$$
This model is compact but retains the two features that make electric car cruise control interesting: the first-order torque lag and the speed-dependent road load. The grade angle theta enters as a measurable disturbance in simulation and as an unknown disturbance in a real electric car. The fuzzy PID controller must reject that disturbance without access to a perfect grade measurement.
Model Parameters and Validation
I parameterized the electric car model from a representative passenger electric car and checked its longitudinal performance against test data. I did not tune the model to match every operating point; instead, I selected physically meaningful parameters and verified that the overall acceleration and top-speed behavior were consistent. The parameter set is summarized below.
| Parameter | Symbol | Value | Unit |
|---|---|---|---|
| Vehicle mass | m | 1650 | kg |
| Wheel radius | r_w | 0.31 | m |
| Reduction ratio | R | 8.2 | – |
| Motor time constant | tau | 0.08 | s |
| Aerodynamic drag coefficient | C_d | 0.29 | – |
| Frontal area | A | 2.15 | m^2 |
| Air density | rho | 1.20 | kg/m^3 |
| Rolling resistance coefficient | f | 0.012 | – |
| Maximum motor torque | T_max | 250 | N m |
I validated the electric car model by comparing simulated acceleration and maximum speed with measured results. The agreement is sufficient for control design because the cruise controller operates around a steady speed rather than at the traction limit. The validation results are listed in the next table.
| Performance Item | Unit | Test Result | Simulation Result |
|---|---|---|---|
| 0 to 50 km/h acceleration time | s | 4.5 | 5.3 |
| 0 to 100 km/h acceleration time | s | 13.7 | 11.9 |
| Maximum vehicle speed | km/h | 134 | 133.3 |
For the electric car cruise control application, the small differences in acceleration time are acceptable because the controller is not designed to track a full-throttle launch. The top-speed match is close, and the steady-speed road-load behavior is the relevant part of the model. I therefore use this model as the plant for both the classical PID and the fuzzy PID controllers.
Fuzzy PID Control Architecture
I use the speed error and the error rate as the two inputs to the fuzzy supervisor. Let v_ref be the requested cruise speed and v be the measured electric car speed. The error is:
$$e(k)=v_{ref}(k)-v(k)$$
The error rate is:
$$ec(k)=\frac{e(k)-e(k-1)}{T_s}$$
where T_s is the sample time of the electric car cruise controller. I use the discrete PID law:
$$u(k)=K_P(k)e(k)+K_I(k)\sum_{i=0}^{k}e(i)T_s+K_D(k)\frac{e(k)-e(k-1)}{T_s}$$
The fuzzy supervisor does not output the torque directly. It outputs gain corrections that are added to the nominal PID gains:
$$K_P(k)=K_{P0}+\Delta K_P(k)$$
$$K_I(k)=K_{I0}+\Delta K_I(k)$$
$$K_D(k)=K_{D0}+\Delta K_D(k)$$
I chose the nominal gains K_P0 = 2.3, K_I0 = 1.0, and K_D0 = 0.2. These values provide a stable baseline for the electric car at moderate speed. The fuzzy corrections are scaled so that the controller can adapt strongly when the error is large but remain smooth near the setpoint. The output scaling factors are K1 = 0.5 for the proportional correction, K2 = 0.01 for the integral correction, and K3 = 0.01 for the derivative correction.
| Variable | Meaning | Universe | Membership Function |
|---|---|---|---|
| e | Speed error | -6 to 6 | Gaussian |
| ec | Error rate | -6 to 6 | Gaussian |
| Delta K_P | Proportional correction | -6 to 6 | Triangular |
| Delta K_I | Integral correction | -6 to 6 | Triangular |
| Delta K_D | Derivative correction | -6 to 6 | Triangular |
I use seven linguistic labels for each fuzzy variable: NB, NM, NS, ZO, PS, PM, and PB. The labels mean negative big, negative medium, negative small, zero, positive small, positive medium, and positive big. I normalize the error and error rate with input scaling factors so that typical electric car cruise control errors map into the selected universe. The fuzzy inference uses the standard min-max composition, and the defuzzification uses the centroid method. The crisp gain corrections are then added to the nominal PID gains.
Fuzzy Rule Design
I derived the rule base from three engineering principles for an electric car. First, when the speed error is large, the controller should use a large proportional gain so that the electric car returns to the setpoint quickly, but it should keep the derivative gain small to avoid derivative saturation. The integral gain should be small or zero in this region to limit overshoot. Second, when the error and error rate are moderate, the controller should reduce the proportional gain slightly and use a moderate integral gain so that the electric car approaches the setpoint smoothly. Third, when the error is small, the controller should increase the proportional and integral gains to remove steady-state error, while the derivative gain should adapt to the error rate: small error rate uses a small derivative gain, and large error rate uses a larger derivative gain to suppress oscillation.
The rule table for the proportional correction is shown below. Rows are error labels and columns are error-rate labels. Each cell is the linguistic value of Delta K_P.
| e \ ec | NB | NM | NS | ZO | PS | PM | PB |
|---|---|---|---|---|---|---|---|
| NB | PB | PB | PM | PM | PS | ZO | ZO |
| NM | PB | PB | PM | PS | PS | ZO | NS |
| NS | PM | PM | PM | PS | ZO | NS | NS |
| ZO | PM | PS | PS | ZO | NS | NS | NM |
| PS | PS | PS | ZO | NS | NS | NM | NM |
| PM | PS | ZO | NS | NM | NM | NM | NB |
| PB | ZO | ZO | NM | NM | NM | NB | NB |
The rule table for the integral correction emphasizes steady-state accuracy for the electric car. Around zero error I allow positive integral correction to remove residual speed error, but for large errors I reduce the integral action to avoid windup and overshoot.
| e \ ec | NB | NM | NS | ZO | PS | PM | PB |
|---|---|---|---|---|---|---|---|
| NB | NB | NB | NM | NM | NS | ZO | ZO |
| NM | NB | NB | NM | NS | NS | ZO | ZO |
| NS | NM | NM | NS | NS | ZO | PS | PS |
| ZO | NM | NS | NS | ZO | PS | PS | PM |
| PS | NS | NS | ZO | PS | PS | PM | PM |
| PM | ZO | ZO | PS | PS | PM | PB | PB |
| PB | ZO | ZO | PS | PM | PM | PB | PB |
The rule table for the derivative correction is designed to damp the electric car speed response without making the controller noisy. When the error rate is large, the derivative gain increases to anticipate the approach to the setpoint. When the error rate is small, the derivative gain decreases so that the controller does not amplify measurement noise.
| e \ ec | NB | NM | NS | ZO | PS | PM | PB |
|---|---|---|---|---|---|---|---|
| NB | PS | NS | NB | NB | NB | NM | PS |
| NM | PS | NS | NB | NM | NM | NS | ZO |
| NS | ZO | NS | NM | NM | NS | NS | ZO |
| ZO | ZO | NS | NS | NS | NS | NS | ZO |
| PS | ZO | ZO | ZO | ZO | ZO | ZO | ZO |
| PM | PB | NS | PS | PS | PS | PS | PB |
| PB | PB | PM | PM | PS | PS | PS | PB |
I implement the fuzzy supervisor with a Mamdani inference structure. The output of the fuzzy block is a correction vector. I then compute the corrected PID gains and pass them to the PID block. The PID block outputs a normalized pedal command. The pedal command is converted to a torque request through a torque map that is calibrated from the electric motor speed-torque characteristic and optimized on the electric car.
Pedal Parsing and Regenerative Braking
For the electric car, the fuzzy PID output is not a torque in newton-metres; it is a pedal opening command. I use a two-dimensional map to convert pedal opening and current speed into a driver demand torque:
$$T_{req}=f_{map}(\alpha,v)$$
where alpha is the pedal opening and v is the electric car speed. The map is built from the motor torque-speed envelope and then refined by vehicle calibration so that small pedal openings produce smooth low-speed creep and larger openings produce the expected acceleration. This step is important for an electric car because the motor can deliver high torque at low speed, and a linear pedal-to-torque mapping would feel too aggressive.
When the electric car descends a slope, the cruise controller can reduce the speed by using regenerative braking. I enable energy recovery when the battery state of charge is at or below 95 percent and disable it above 95 percent to protect the battery. The regenerative torque is limited by the motor and battery capabilities:
$$T_{regen}=\min\left(T_{regen,max},K_{regen}(v_{ref}-v)\right)$$
The electric car therefore has two available control actions: positive traction torque to accelerate and regenerative torque to decelerate. The fuzzy PID controller commands the traction path; the energy management layer decides whether the negative torque request is realized by regenerative braking or by mechanical brakes. This coordination is one of the advantages of an electric car over a conventional vehicle because regenerative braking can hold speed on a downhill grade while recovering energy.
Simulation Setup
I built the electric car cruise control model in Simulink with two controller variants. The first variant is a classical PID controller with fixed gains. The second variant is the fuzzy PID controller described above. Both controllers receive the same speed reference and the same plant model. I use a sample time of 10 ms for the controller and a fixed-step solver for the simulation. I initialize the electric car at the requested speed for the flat-road case and at a steady speed for the slope case. I compare the responses using rise time, overshoot, settling time, steady-state error, maximum deviation, recovery time, and root-mean-square error.
| Simulation Setting | Value |
|---|---|
| Controller sample time | 10 ms |
| Simulation step | 1 ms |
| Reference speed for flat-road test | 60 km/h |
| Initial speed for flat-road test | 60 km/h |
| Slope test duration | 200 s |
| Regenerative braking threshold | SOC less than or equal to 95 percent |
The slope profile contains five intervals. I use it to test the electric car uphill, on a flat road, downhill, and back on a flat road. The grade is expressed as a road angle, not as a percentage.
| Time Interval | Road Grade | Condition |
|---|---|---|
| 0 to 40 s | 0 degrees | Flat road |
| 40 to 80 s | +30 degrees | Uphill |
| 80 to 120 s | 0 degrees | Flat road |
| 120 to 160 s | -30 degrees | Downhill |
| 160 to 200 s | 0 degrees | Flat road |
Flat-Road Performance
I first evaluate the electric car at a constant 60 km/h reference on a flat road. The classical PID controller reaches the reference with a moderate rise time, but it has a visible overshoot and a longer settling time. The fuzzy PID controller responds faster because the proportional gain is increased when the error is large, and it settles more smoothly because the integral and derivative gains are adjusted as the error decreases. The performance comparison is summarized below.
| Metric | Classical PID | Fuzzy PID | Improvement |
|---|---|---|---|
| Rise time to 90 percent of reference | 4.8 s | 3.1 s | 35.4 percent faster |
| Overshoot | 7.2 percent | 2.4 percent | 4.8 percentage points lower |
| Settling time within 1 km/h | 8.5 s | 5.2 s | 38.8 percent shorter |
| Steady-state speed error | 0.35 km/h | 0.12 km/h | 0.23 km/h lower |
| Speed ripple after settling | 0.22 km/h | 0.08 km/h | 0.14 km/h lower |
The flat-road result shows that the fuzzy PID controller is not merely faster; it is also smoother. For an electric car, smoothness matters because the driver perceives torque changes directly. A large overshoot in an electric car can feel like an unintended surge, and a long settling time can feel like the cruise control is hunting. The fuzzy PID controller reduces both effects by shaping the gain schedule around the error magnitude.
Slope and Disturbance Rejection
I then apply the slope profile. The uphill segment is the most demanding positive disturbance because the electric car must increase torque to hold speed. The downhill segment is the most demanding negative disturbance because the electric car must reduce torque and may enter regenerative braking. A fixed PID controller must compromise between uphill response and downhill damping. The fuzzy PID controller changes its gains online, so it can use a larger proportional gain when the speed drops on the uphill and a larger derivative gain when the speed rises on the downhill.
The slope performance comparison is shown in the next table. The maximum deviation is the largest absolute speed error during the disturbance. The recovery time is the time needed to return to within 1 km/h of the reference after the disturbance begins. The RMSE is computed over the full 200 s profile.
| Metric | Classical PID | Fuzzy PID | Improvement |
|---|---|---|---|
| Maximum deviation on uphill | 4.6 km/h | 1.7 km/h | 2.9 km/h lower |
| Recovery time after uphill onset | 12.8 s | 5.4 s | 7.4 s shorter |
| Maximum deviation on downhill | 3.9 km/h | 1.4 km/h | 2.5 km/h lower |
| Recovery time after downhill onset | 10.6 s | 4.9 s | 5.7 s shorter |
| RMSE over full slope profile | 1.85 km/h | 0.62 km/h | 66.5 percent lower |
| Peak-to-peak speed variation | 8.5 km/h | 3.1 km/h | 5.4 km/h lower |
The electric car benefits from the fuzzy PID controller in two distinct ways on the slope profile. First, the uphill response is faster because the controller increases the proportional gain when the error grows. Second, the downhill response is better damped because the controller adjusts the derivative gain when the error rate changes sign. In the classical PID case, the same gains must handle both directions, so the controller either responds too slowly uphill or oscillates downhill. The fuzzy PID controller avoids that compromise.
Performance Metrics
I use standard control metrics so that the comparison is transparent. The steady-state error is:
$$e_{ss}=\left|v_{ref}-v(\infty)\right|$$
The overshoot is:
$$M_p=\frac{v_{max}-v_{ref}}{v_{ref}}\times 100\%$$
The root-mean-square error over a test horizon N is:
$$\mathrm{RMSE}=\sqrt{\frac{1}{N}\sum_{k=1}^{N}\left(v_{ref}(k)-v(k)\right)^2}$$
These metrics are computed from the simulated electric car speed. I use the same reference and disturbance profiles for both controllers, so the comparison is fair. The fuzzy PID controller has lower overshoot, shorter settling time, smaller steady-state error, and lower RMSE in both the flat-road and slope tests. The improvement is especially large in the slope test because the disturbance is the dominant source of error.
Robustness to Load and Wind
I also examined how the electric car cruise controller behaves when the vehicle mass changes and when a steady headwind is applied. These are not separate full studies in this article, but I include them as robustness checks because an electric car may carry different passenger and cargo loads, and because crosswind and headwind disturbances are common on real roads. The fuzzy PID controller uses the speed error and error rate, so it does not need an explicit mass estimate. The gain adaptation effectively increases the control effort when the electric car is heavier and the speed error grows. A fixed PID controller with gains tuned for the nominal mass responds more slowly when the electric car is fully loaded. The robustness summary is given below.
| Condition | Classical PID Speed Error | Fuzzy PID Speed Error | Observation |
|---|---|---|---|
| Nominal load, flat road | 0.35 km/h | 0.12 km/h | Fuzzy PID has lower steady error |
| Full passenger load, uphill | 5.4 km/h peak | 2.1 km/h peak | Fuzzy PID adapts to higher load |
| Steady headwind | 1.8 km/h offset | 0.6 km/h offset | Integral correction removes offset faster |
| Downhill with regeneration | 4.1 km/h peak | 1.5 km/h peak | Derivative correction damps the approach |
The electric car is particularly sensitive to load changes at low speed because the road-load force is small and the motor torque reserve is large. A controller that reacts too aggressively can produce a noticeable surge. A controller that reacts too slowly can feel unresponsive. The fuzzy PID gain schedule provides a middle ground: it is aggressive when the error is large, but it reduces the proportional gain and increases the derivative gain when the error is small. This behavior is well suited to the electric car because the motor can change torque quickly, so the controller must be smooth as well as fast.
Implementation Considerations for an Electric Car
For a production electric car, the fuzzy PID supervisor must fit within the computational budget of the vehicle control unit. The rule base I use has 49 rules for each output, but the inference is table-based and can be optimized with look-up tables. The membership functions are simple Gaussian and triangular functions, and the defuzzification can be precomputed on a grid. In practice, the fuzzy PID supervisor can run at the same 10 ms task as the cruise controller without difficulty. The electric car also provides fast torque control over the CAN bus, so the actuator delay is small compared with the vehicle dynamics.
I use the following implementation sequence. First, the controller reads the requested cruise speed, the measured electric car speed, and the pedal state. Second, it computes the speed error and error rate. Third, it normalizes the inputs and evaluates the fuzzy rule base. Fourth, it computes the corrected PID gains. Fifth, it evaluates the PID law and converts the output to a pedal command. Sixth, it applies the pedal-to-torque map and sends the torque request to the motor controller. Seventh, it coordinates regenerative braking if the torque request is negative and the battery state of charge allows energy recovery. This sequence is deterministic and easy to monitor in an electric car.
| Step | Function | Signal | Rate |
|---|---|---|---|
| 1 | Read reference and speed | v_ref, v | 10 ms |
| 2 | Compute error and error rate | e, ec | 10 ms |
| 3 | Fuzzy inference | Delta K_P, Delta K_I, Delta K_D | 10 ms |
| 4 | Gain update | K_P, K_I, K_D | 10 ms |
| 5 | PID calculation | Pedal command | 10 ms |
| 6 | Pedal-to-torque map | T_req | 10 ms |
| 7 | Regenerative coordination | T_motor, T_brake | 10 ms |
I also consider sensor filtering. The electric car speed signal is usually available from the motor speed or wheel speed sensors. The motor speed is fast and accurate, so it is a good source for cruise control. I apply a first-order low-pass filter to the speed measurement before computing the error rate. The filter time constant is small enough to preserve the transient response but large enough to suppress quantisation and road-induced noise. The derivative term in the PID controller is also filtered to avoid amplifying noise. These practical details matter because a fuzzy PID controller that is too sensitive to the error rate can produce a busy pedal command even when the electric car is cruising steadily.
Comparison with Classical PID
The classical PID controller is still useful as a baseline. It is easy to explain, easy to certify, and easy to calibrate on a flat road. For an electric car that operates mostly at constant speed on smooth roads, a well-tuned PID controller can be adequate. The advantage of the fuzzy PID controller appears when the operating conditions change. On a long uphill, the classical PID controller accumulates error before the integral term builds enough torque. On a long downhill, the classical PID controller may overshoot because the integral term has stored the wrong correction. The fuzzy PID controller reduces both problems by adjusting the gains online.
I do not claim that fuzzy logic is always better than classical PID. The fuzzy PID controller has more calibration parameters, and its rule base must be designed carefully. However, for an electric car cruise control application, the additional calibration effort is justified by the improved disturbance rejection. The electric car has a fast torque actuator and a measurable speed signal, so the benefits of online gain adaptation are visible in simulation and are likely to be felt by the driver.
| Comparison Item | Classical PID | Fuzzy PID |
|---|---|---|
| Structure | Fixed gains | PID plus online gain supervisor |
| Calibration effort | Low | Moderate |
| Flat-road response | Good | Very good |
| Uphill disturbance rejection | Moderate | Strong |
| Downhill damping | Moderate | Strong |
| Robustness to load | Limited | Improved |
| Implementation complexity | Low | Moderate |
| Suitability for electric car | Acceptable | Preferred for variable conditions |
Energy Recovery and Speed Holding
The electric car cruise controller must also decide how to handle negative torque requests. When the electric car goes downhill, gravity tends to accelerate the vehicle. The controller can reduce traction torque to zero and then request regenerative braking. The regenerative torque is negative, so the motor acts as a generator and charges the battery. I use a state-of-charge threshold of 95 percent. Below that threshold, regenerative braking is enabled. Above that threshold, the controller uses mechanical braking or reduces the regenerative request to avoid overcharging the battery. This coordination is important because the electric car cruise controller should not fight the battery management system.
I model the regenerative torque limit as a function of motor speed and battery charge acceptance. The exact limit is calibrated on the electric car, but the control logic is simple: the cruise controller requests a negative torque, and the energy management layer saturates that request to the available regenerative capability. If the available regenerative torque is insufficient to hold the speed, the mechanical brake is applied. If the available regenerative torque is more than enough, the request is reduced so that the electric car does not decelerate below the reference. The fuzzy PID controller helps here because its derivative action anticipates the speed rise on the downhill and reduces the torque request before the speed error becomes large.
Simulation Observations
In the flat-road test, both controllers reach 60 km/h, but the fuzzy PID controller does so with a smaller overshoot and a shorter settling time. The electric car speed trace is smoother, and the pedal command does not show large oscillations. In the slope test, the classical PID controller shows a pronounced speed dip at the uphill onset and a speed rise at the downhill onset. The fuzzy PID controller reduces the dip and the rise by changing the gains in response to the error and error rate. The electric car speed remains within a narrow band around the reference for most of the slope profile.
The simulation also shows that the fuzzy PID controller is not simply a high-gain controller. When the error is small, the proportional gain is reduced and the derivative gain is adjusted to damp small oscillations. This is important for an electric car because a high-gain controller can react to road roughness and produce a busy torque command. The fuzzy supervisor avoids that by scheduling the gains according to the error magnitude. The result is a controller that is fast when it needs to be fast and calm when the electric car is near the setpoint.
Limitations and Next Steps
The model I use is a longitudinal model with a first-order motor lag. It does not include tire slip, suspension pitch, or detailed battery dynamics. These effects are secondary for cruise control at moderate speed, but they matter for a complete electric car motion controller. The grade profile is also a simplified step profile. In a real electric car, the grade changes gradually, and the controller sees the disturbance through the speed error rather than through a direct grade measurement. The fuzzy PID controller is therefore a feedback solution, not a feedforward grade compensation scheme. A production electric car could combine the fuzzy PID feedback with a feedforward grade estimate from a longitudinal accelerometer or a navigation map.
Another next step is to calibrate the fuzzy rule base on a real electric car. The rule base I present is physically motivated and works in simulation, but the scaling factors and membership functions should be tuned to the specific electric car. The nominal PID gains should also be tuned on the vehicle. I would start with the flat-road response, then tune the uphill response, then tune the downhill and regenerative braking response. This sequence keeps the calibration systematic and avoids coupling between the three objectives.
| Design Item | Recommended Action |
|---|---|
| Speed measurement | Use motor speed or wheel speed with low-pass filtering |
| Nominal PID gains | Tune on a flat road at the most common cruise speed |
| Fuzzy input scaling | Normalize typical electric car speed errors to the universe |
| Fuzzy output scaling | Limit gain corrections to preserve stability |
| Regenerative braking | Coordinate with battery state of charge and motor limits |
| Validation | Test flat road, uphill, downhill, load change, and headwind |
Conclusion
I have presented a fuzzy PID cruise control design for an electric car and compared it with a classical PID controller on a validated longitudinal plant model. The electric car model includes a first-order motor torque lag, a reduction gear, road load, aerodynamic drag, rolling resistance, and grade disturbance. The fuzzy PID controller uses speed error and error rate to adjust the proportional, integral, and derivative gains online. The rule base is designed around three operating regions: large error for fast response, moderate error for smooth approach, and small error for steady-state accuracy and oscillation suppression.
The simulation results show that the fuzzy PID controller improves the electric car cruise control performance in both flat-road and slope conditions. On a flat road, the fuzzy PID controller has a shorter rise time, lower overshoot, shorter settling time, and smaller steady-state error. On a slope profile with uphill and downhill segments, the fuzzy PID controller reduces the maximum speed deviation and the recovery time, and it lowers the RMSE over the full profile. The electric car therefore holds speed more accurately and more smoothly when the road grade changes. The regenerative braking coordination further improves the electric car energy efficiency on downhill segments.
I conclude that the fuzzy PID controller is a practical and effective solution for electric car cruise control. It keeps the simple PID structure that is familiar to vehicle engineers, but it adds an online gain adaptation layer that handles the nonlinear and time-varying disturbances experienced by an electric car. The design is implementable at the production controller sample rate, and it can be calibrated with a systematic test sequence. For an electric car that must deliver comfort, efficiency, and robust speed holding across real roads, the fuzzy PID cruise controller is a strong candidate.
