Professional Documents
Culture Documents
Under Guidance of
Prof. Kavi Arya
and
Prof. Shashikanth Suryanarayanan
z Problem Statement
z Theory
z Experimental Work
z Future Work
z References
2
What is Embedded System?
z Embedded system composed of Hardware
and Software components are designed to
interact with a physical environment in
real-time in order to fulfill control objectives
and design specifications.
Timing Diagram
5
Engine Sensors and Actuators:
Outputs of system
Spark Ignition To give the signal to ignition driver
Driver relative to the crank position
Fuel Injection To give the signal to fuel injection driver
driver relative to the crank position
6
Problems
7
Block Diagram of EMS
Manifold Air
Pressure (MAP)
Sensor
IC
Fuel Injector Engine FPGA
Board
with ADC/DAC
Crank
Fuel Position
Pump Sensor
Spark
Ignition
Driver
DRIVER
INPUT
(On/Off)
8
Digital Controller (2nd order)
b0 + b1 z −1 + b2 z −2 Y ( z )
C ( z) = −1 −2
=
1 + a1 z + a2 z X ( z)
Y ( z )(1 + a1 z −1 + a2 z −2 ) = X ( z )(b0 + b1 z −1 + b2 z −2 )
y (n) = − a1 y (n − 1) − a2 y (n − 2) + b0 x(n) + b1 x(n − 1) + b2 x(n − 2)
9
Implementation of Discrete time Controller
−1
b0 + b1 z + ... Y ( z)
C ( z) = −1 −2
=
1 − a1 z − a2 z − ... U ( z )
Y ( z )(1 − a1 z −1 − a2 z −2 − ...) = U ( z )(b0u (k ) + b1 z −1 + ...)
y (k ) = a1 y (k − 1) + a2 y (k − 2) + ... + b0u (k ) + b1u (k − 1) + ...
Algorithm :
1.Read u(k)
2.Calculate y(k) = bo*u(k) + history
3.Output y(k)
4.Calculate history for the next cycle
10
What is FPGA
C O N F IG U R A B LE LO G IC B LO CK ( CLB)
So u r c e : X ilin x
English specification
Executable Throughput,
program
behavior design time
register- Function units,
function Sequential clock cycles cost
transfer
machines
Literals,
Logic gates logic logic depth
30
Controller Building Block in System generator
Fs = 1;
data_width = 12;
1 − 1.6929 z −1 + z −2 Y ( z) b0 = 1;
data_binary_pt = 11;
C ( z) = −1 −2
=
1 + 1.2591z + 0.825 z
b1 = -1.6929;
coef_width = 12; X ( z) b2 = 1;
coef_binary_pt = 10;
31
a1 = 1.2591;
Step Responses
Matlab simulation
0v
Path
35
Main Blocks for Spark Ignition control (open loop)
Top level View
Ignition puls
width
Inductive
couple Edge detectors
sensor o/p
and 45 BTDC Ignition time Ignition signal
Measuring time detector calculation duration
of inductive sensor calculation
Signal to
Positive level count
Ignition
RPS Look up Table Spark Actuator
Time to frequency RPS vs Spark advanceConverts spark
converter Advance advance
angle In clocks
Advantages
1. IP reusable
2. Scalable / Generic
3. Easy to Debug / Verification
37
Spark Ignition System Decomposition
38
Synchronizer Data Path Synthesis
Counter Register
Inputs
Outputs
Sensor1
Count_enable
Count_overflow
Reg_enable
Clk
Counter_reset
Reset
40
Reg_reset
State Diagram for Ignition Driver
41
How to Find RPM?
0v
FF counter Interpolater
Ignitio
sensor1 signal
adder
Driver
FF adjustment
counter
43
Plot between RPM vs. Spark advance
Matching 96.64%
Where x is rpm
Some Issues in Implementing
z When inferring hardware from HDL, it is important to
keep in mind the type of hardware you want.
Ex. On the same signal we can’t detect both edges
--*as the CoolRunner-II FPGA is the only device that has dual-edge
triggered flip-flops.
Ref: http://support.xilinx.com/support/software_manuals.htm45
Reset State
z Basically reset is to initialization
- To bring the system to a known state
reset
Q To ckt2
clock
Fail-safe ECU System using Dynamic Reconfiguration
48
ECU in case of a fault engine controller
49
Watch Dog Timers Architecture
Input 1
Input 2
50
Design validation
52
Simulation results of 45BTDC detector
53
Synchronizer Control Path in Xilinx ISE Synthesis
tool for Spartan 3 (XC3S200FT256) board
54
Synchronizer Data Path in Xilinx ISE Synthesis
tool for Spartan 3 (XC3S200FT256) board
55
Conclusion
Questions?
Suggestions?
59
Conversion floating math to fixed point