|
Issue
103, February 1999
Truck
Speed Limiter Control
by
Constantin von Altrock
Start
Control
Requirements
Mechanical
Design
Fuzzy-Logic
Controller
Implementation
Results
References
& Sources
IMPLEMENTATION
Because fuzzyTECH
can simulate the fuzzy-logic system without the target
hardware, a fair amount of optimization was accomplished
off-line on the PC. Final optimization and verification
of the system were conducted on real trucks.
The target system and the
MCU for the electronic control unit is mounted in the
truck and connected to the development PC (a laptop in
the trucks cabin) by a serial cable. Serial connection
enables modification of the running fuzzy-logic controller
on-the-fly.
This development technique
is efficient because it lets the developer analyze how
a certain behavior of the fuzzy-logic controller is caused
by the membership-function definition and the rules. And
because modifications can be done in real time, the effects
can be felt on the truck instantly.
One way to enable on-the-fly
debugging is to link the fuzzyTECH real-time remote
cross-debugger (RTRCD) module to the fuzzy-logic controller
that runs on the MCU and connect it to a serial driver.
The RTRCD module consumes about half a kilobyte of ROM,
a few bytes of RAM, and some computing resources to serve
the serial communication on the MCU.
Because the PIC used in this
application cant provide such resources, the serial
debug mode of fuzzyTECH is used rather than the
RTRCD module. In serial debug mode, the values of the
input variables are sent from the MCU to fuzzyTECH
running on the development PC via the serial cable and
the results are sent back.
fuzzyTECH shows the
entire fuzzy-logic computation in its editor and analyzer
windows and enables on-the-fly modifications. To support
serial communication, a piggyback board containing a MAX232
driver IC is mounted on the speed-limiter board.
Using fuzzyTECHs
serial debug mode rather than the RTRCD module means that
the code size and computation effort previously required
for the fuzzy-logic computation on the MCU can be saved
and used for the serial communication.
The disadvantage of the serial
debug mode is that it computes the systems results
on the PC, where real-time response cannot be guaranteed.
Also, unlike the RTRCD module, any crash of Windows, the
PC, or the serial communication will halt computation
in serial debug mode.
|