AC 1997paper109 PDF
AC 1997paper109 PDF
AC 1997paper109 PDF
ABSTRACT
This paper describes the design of a Digital Signal Processing (DSP) system and a set of
laboratory experiments to understand and /or teach real time system applications. Digital
Signal processors have high performance and in chip integration and are highly suitable
for real time control applications. TMS 320C5X is an advanced fixed point DSP
processor and is widely used for communication, multimedia and control applications.
This paper describes a top down approach for the selection of DSP processor, the
hardware board design using TMS320C5X processor, software development using the
custom board which can be interfaced with the personal computer (PC). A typical course
on this topic starts with an introduction to the DSP chip and then provides a step by step
instruction with hands on training using several lab experiments.
Some of the laboratory experiments described here are: FIR filter and IIR filter
implementation, word recognition, touch-tone phone dialer and Fuzzy logic based engine
control Application of DSP in Automotive control and use of application development
tools such as Matlab, Filter design software design packages are also described.
INTRODUCTION
DSP processors are reduced instruction processors optimized for the fastest possible
execution of addition, subtraction, multiplication and shifting instructions. DSPs have onchip multipliers, compute a pipelined running sum of products and perform data scaling,
memory shifts and pointer incrementing in parallel with the other operations. Advanced
control algorithms requiring very short time loop can be easily implemented using DSPs.
Rapid advances in digital signal microprocessors (DSP) and application specific DSPs
are causing enormous impact in the design of real time embedded control systems.
Advances in circuit technology, architecture and algorithms, increased speed, availability
of fixed point and floating point processors with on-chip DMA ( direct memory access),
timer, interconnect ports, pipelined and parallel arithmetic capabilities are contributing to
novel applications for DSP chips.
Pseudorandom Sequences:
The Pseudorandom sequences have the properties of random sequence. The random
properties satisfied by these sequences are:
1. The balance property: In each run of the sequence the number of 1s differ from the
number of 0s by at most one.
2. The run property: Among the runs of 1s and 0s in each period of the sequence, one
half of the runs of each kind in a period of the sequence are of length 1, one fourth of
length two, 1/ 2k if length k, as long as these numbers have any meaning.
3. The correlation property: If term by term comparison of the sequence with a cyclic
shift of itself is done, then the number of agreements will differ from the number of
disagreements by, at most 1.
Basically the Pseudorandom encoder uses a shift register as shown in Figure 1. Table 1
gives the feedback connections in the sequential mode. The maximal length shift register
sequence has a length n = 2K -1 and the legendre code has a length n=4m-1 where n takes
on any positive integer value such that n is a prime.
The students write a PRBS sequence generator program in DSP assembly language and
down load it to the board and the output is passed through the analog interface board to
the speaker. The output is the white noise sound through the speaker. In the following
section the application of DSP for real time Fuzzy logic based control of engine idle
speed is given.
FUZZY CONTROL
Fuzzy control has been applied successfully to a wide variety of difficult control
problems. The advantages of fuzzy control are:
x Complete mathematical knowledge of the controlled object is not required.
x Provides great flexibility and simple solutions to complex problems which needs
descriptive and intuitive thinking.
x The fuzzy controller is implemented with simple IF - THEN rules.
In fuzzy control, values for inputs and outputs are defined as fuzzy sets. The fuzzy sets
are described by membership functions as illustrated in Figure 2. The fuzzy set values are
labeled NM (negative medium), NS (negative small), Z (zero), PS(positive small) and
PM(positive medium).
NM
-40
NS
-20
PS
PM
20
40
The inputs to a fuzzy controller are assigned to a fuzzy variable with a degree of
membership given by the membership functions. The degree of membership is in the
range of 0 to 1. A degree of 0 implies that input value does not belong to the set and a
value of 1 implies that the input value belongs to the set entirely. The input value can
also have a degree between 0 and 1. For example, in Figure 2, an input value of 10 would
have a degree of membership in both Z and PS of 0.5 and a degree of 0 for other
membership functions. On the other hand, an input value of -40 would belong to NM
with degree of membership 1 and 0 for other membership functions. This process is
called fuzzification. The typical membership function shapes are triangular, trapezoidal
and exponential. The shape of the membership functions affects the time and space
requirements of the microcontroller. The next process is Rule Evaluation. The fuzzy
controller consists of a set of IF - THEN rules of the form:
IF {input conditions}
THEN {action on output }
The rules implicitly expresses the knowledge of the system in consideration in an
intuitive manner. After applying all of the fuzzy rules to a given set of inputs the output
will also belong to more than one membership function with different degrees of
membership. The next step is called defuzzification which involves computing the crisp
output value. The output value is a weighted average of the fuzzy output sets. The
functional diagram of the fuzzy controller is shown in Figure 3.
FUZZY CONTROLLER IMPLEMENTATION
The inputs to the fuzzy controller are RPM error and Error rate. RPM error is the
difference between current and set idle speed. Error rate is the difference between
current and previous engine speed. The outputs of the fuzzy controller are Stepper Motor
Position (air flow) and Spark Advance (SA).
The stepper motor output has a wide dynamic range (0-3000 rpm), but its action on the
idle speed is retarded by the intake manifold capacity as well as the intake and
compression phases. The spark advance output has an immediate action on the
compressed mixture in the combustion chamber, but only a limited dynamic range (+/100 rpm ).
Figure 4 shows a fuzzy K-map which maps out the rules for the fuzzy controller. The
column corresponds to the fuzzy set RPM Error and the rows correspond to the fuzzy sets
Error Rate. The entries in the cells of the fuzzy K-map are the fuzzy sets for the output
spark advance. For example,
If RPM error is NM and Error rate is NS Then Spark Advance (output) will be PS. A
similar table exists for Stepper motor position. The output is then calculated using the
expression
centroids x weights
output =
weights
CRISP INPUT
FUZZIFICATION
RULE EVALUATION
IF X And Y THEN Z
x
x
DEFUZZIFICATION
CRISP OUTPUT
Figure 3 Functional Diagram of Fuzzy Controller
RPM Error
NM
NS
PS
PS
PM
PM
PS
PS
NM
PM
Error
NS
PS
PS
PS
Rate
PM
PS
NS
NM
PS
NS
NS
NS
PM
NS
NS
NM
NS
NM
special features like: internal hardware multiplier, 32-bit accumulator, single cycle
instructions, multiply and accumulate instruction, and repeat instructions.
SUMMARY
This paper describes the design of a Digital Signal Processing (DSP) system and a set of
laboratory experiments to understand and /or teach real time system applications. The lab
experiments and the real time control application are chosen to provide the proper
understanding of DSP processor based systems. DSP processors are ideally suited for
Fuzzy real time controllers.
1,2
2,3
3,4
3,5
5,6
6,7
2,3,4,8
5,9
7,10
9,11
2,10,11,12
1,11,12,13
2,12,13,14
14,15
11,13,14,16
14,17
11,18
14,17,18,19
17,20
Sequence length
3
7
15
31
63
127
255
511
1023
2047
4095
8191
16383
32767
65535
131071
252143
524287
1048575
References
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
S. Ganesan, R. Sudhakar, Raj Shah, Digital Signal Processing using TMS 320C5X, Advanced
Microcomputer System education division, 1996, ISBN 0-9642962-5-X
S. Ganesan Advanced digital signal processors and automotive applications, ASEE annual
conference proceedings, Session 1620, pp. 300-305, 1992 .
Tretter, Communication system design using DSP algorithms Plenum Publishing, 1995.
T.W. Parks and C.S.Burrus, Digital Filter Design Wiley.
J.G. Proakis and D.G. Manolakis, DSP principles, algorithms and applications 2nd edition,
Macmillan.
M.J.T Smith and R.M. Mersereau, Introduction to DSP - A computer laboratory text book John
Wiley.
R.M. Merseraeau and M.J.T.Smith, Digital Filtering - a computer laboratory text book John Wiley.
P. Papamichalis, A practical approach to speech coding, Prentice Hall.
Ralph Chassiang, DSP with C 30 John Wiley.
Digital control applications with TI TMS 320 processors, Texas Instruments
Applications books Vol. 1, 2, 3 for TMS 320 by Texas Instruments
Ahmed and R. B. Kline, Recent advances in DSP systems IEEE communication Magazine, May
1991.
Takahashi et. al, A Simple Engine Model for Idle Speed Control, SAE 850291, 1985.
Woods, Robert, Et. Al, Development of an Idle Speed Control System for Spark Ignition Engines,
Proceedings of the 31st Conference on Decision and Control, 1982.
Sans Mariano, A Second Order Idle Speed Controller, SAE880184, 1988.
Hrovat, D., Bodenheimer, B., Robust Automotive Idle Speed Control Based on P-synthesis,
Proceedings of the American Control Conference, 1983.
Morris, R.L., Powell, B.K., Modern Control Applications in Idle Speed Control, Proceedings of the
1983 American Control Conference, Vol. 1, 79-85, June, 1983.
Abate, N. Dosio, Use of Fuzzy Logic for Engine Idle Speed Control, SAE900594, 107-114.
Murukami, S., Application of Fuzzy Controller to Automobile Speed Control System, IFAC 1983,
43-49.
E. Haskell, Object Oriented Implementation of Fuzzy Control, Tech. Rep. No. 9501-1, Oakland
University, USA, March, 95.
Puskorius, G.V., Feldkamp, L.A., Automotive Engine Idle Speed Control with Recurrent Neural
Networks, Proceedings of the American Control Conference, 1983, 311-316.
Pedrycz etal., A reconfigurable Fuzzy Neural Network with In-Situ learning, IEEE Micro, August 95,
pp. 19-30