Embedded System with Distributed Algorithm - RealTime Processing - TTCAN
This project is to control an Inverted Rotary Pendulum work at non-zero position input by combining State Space Control, Distributed Algorithm, Embedded C, FreeRTOS and TTCAN . They all were performed on four Atmel AVR.
Physical IRP model
Simulink Model:
Function's structure of the control system:
The communication's schedule (TTCAN) among microControllers: - 1st microController - SEN-mu: handles with sensor signals. After receiving sensor's data in every 3 milliseconds, the data is then pre-processed to get four system states and transmit to other microController. - 2rd microController - PUSB-mu: implements State-space control algorithm and handle the input command from Button Matrix. It receives four states of IRP (2 angles, 2 angular velocities) and one additional reference input state from HMI-mu, which is then applied to the controlled formula. Its output is the amount of energy should be transmitted to the DC motor. For Button Matrix, it would process the input signal such as changing the reference input, on/off system, check the system's state. - 3nd microController - LCD-mu: Display system states and working condition on LCD. It also works as Time Master which transmits Time Point to all other microController to synchronize the clock in the whole system.- 4th microController - MOTO-mu: It controlled the DC motor via H-bidge circuit with frequency of 14kHz.