1 / 96

By: Mark Bright and Mike Donaldson

By: Mark Bright and Mike Donaldson. Advisor: Dr. Gary Dempsey. Project Goal System Applications Thermal Plant Overview Engine Side Thermal Side. The goal of our Engine Control Workstation is to simulate thermal environments that are found in liquid-based cooling systems.

machiko-rin
Télécharger la présentation

By: Mark Bright and Mike Donaldson

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. By: Mark Bright and Mike Donaldson Advisor: Dr. Gary Dempsey

  2. Project Goal System Applications Thermal Plant Overview Engine Side Thermal Side

  3. The goal of our Engine Control Workstation is to simulate thermal environments that are found in liquid-based cooling systems. With this system we created several different control methods via MATLAB and Simulink working together to control both the engine and thermal transient and steady state responses.

  4. System Applications Car Application PC Application The overall goal of this project is to protect the motor with varying loads with minimum energy usage

  5. Overall System Engine Side Circuitry Thermal Side Circuitry

  6. Overall System Thermal DSP Board Engine DSP Board

  7. Thermistor Flowmeter Pump Cooling Blocks Pittman Motor Generator

  8. Thermal Comparison Pittman Motor Tmax = 311 deg F Thermal impedance 75.9 deg F/watt (2.9 A)^2 * (3.91 ohm) = 36 watts 36W * (75.9 deg F/watt) = 2732 deg F

  9. Engine Side Goals Engine Control: Minimize C-code and execution time Learn Auto-Code generation platform of Simulink/DSP interface Design software for PWM generation and velocity calculation from rotary encoder. Design closed-loop controllers for velocity and acceleration control.

  10. 32 bit Processor • 150 MHz Clock • 16 A/D Channels • 12 PWM Digital I/O Channels • 128K on-chip Flash Memory • 9 Ports Total • 3.3v Supply • Interfaced to PC by serial port • Inputs and output go through level-shifter IC (5v to 3.3v / 3.3v to 5v)

  11. Engine Side Flowchart User Interaction: Set RPM and Gain MATLAB GUI System Design Simulink Model Code Composer Auto Code Generated C Code TI 2812 DSP Board PWM Output to Drive Motor

  12. Both encoder channels from the Pittman motor are offset from each other • Pulses are wired into the DSP board Port 8 – pins 6 and 7 • 2 counts can be obtained per period for each channel – 4 times as many counts • Allows for Steady State Error of ± 5 RPM • Simulink codes this as inner shaft RPM, which must be converted to outer shaft RPM – 5.9:1 gear ratio • Drag QEP Block into Simulink diagram to implement

  13. Engine Side Simulink Model • Data sent to GUI is set here • Model is used to generate Code Composer C code • P, PI, and FF Control Implemented

  14. DSP Board • Data sent to GUI is set here • Model is used to generate Code Composer C code • P, PI, and FF Control Implemented

  15. Feedback Loop • Data sent to GUI is set here • Model is used to generate Code Composer C code • P, PI, and FF Control Implemented

  16. PI Control • Data sent to GUI is set here • Model is used to generate Code Composer C code • P, PI, and FF Control Implemented

  17. Feed Forward Controller • Data sent to GUI is set here • Model is used to generate Code Composer C code • P, PI, and FF Control Implemented

  18. GUI Data Controller Output PWM Duty Cycle Actual RPM Desired RPM • Data sent to GUI is set here • Model is used to generate Code Composer C code • P, PI, and FF Control Implemented

  19. Simulation model started where the 2008 mini project left off Bilinear Transform converted analog controllers to digital controllers P, PI, and FF Control Implemented Simulation Model

  20. (s/146+1) ______________ FF=Gp= (s/1460+1) 17.1 Feed-Forward Design Gp = ______________ (s/146+1)(s/776+1) 17.1 -1

  21. FF Simulation vs. Actual Simulation: • 596 RPM input • FF Output is 17 RPM • Impulse duration was 2mS Actual: • 596 RPM input • FF Output is 17 RPM • As expected from simulation

  22. 100 RPM Step Input FF Control decreases response time by 20 mS Less overshoot Smaller time to first peak Control Testing PI Control Only FF Compensation • RPM vs Time (ms) plot

  23. Start, Type “guide” in MATLAB GUI can be designed here with many components Once designed, MATLAB creates an .m file and .fig file MATLAB GUI Design

  24. GUI created in MATLAB and interfaced to Simulink Model • Plots Motor RPM, PWM Duty Cycle, Transient Response, and both PI and Feed Forward Controller Output • User can input desired RPM: 0 to 834 RPM • Optimal controller gains loaded at startup, but user can control both the gain and type of control • GUI updates in real time

  25. GUI Code numMsgsOchan1 = r.msgcount('ochan1'); if (numMsgsOchan1) speed = r.readmsg('ochan1', 'int32'); end numMsgsOchan2 = r.msgcount('ochan2'); if (numMsgsOchan2) pid = r.readmsg('ochan2', 'int32'); end numMsgsOchan3 = r.msgcount('ochan3'); if (numMsgsOchan3) RPM = r.readmsg('ochan3', 'int32'); end numMsgsOchan4 = r.msgcount('ochan4'); if (numMsgsOchan4) PI_Out = r.readmsg('ochan4', 'int32'); end numMsgsOchan5 = r.msgcount('ochan5'); if (numMsgsOchan5) FFOut = r.readmsg('ochan5', 'int32'); end

  26. GUI Code if ((numMsgsOchan1 ~=0) && (numMsgsOchan2 ~= 0) && (numMsgsOchan3 ~= 0) && (numMsgsOchan4 ~= 0) && (numMsgsOchan5 ~= 0)) axes(handles.axes3); plot(handles.axes3,x_axis1, RPM); title(handles.axes3,'Measured speed of the Motor'); xlabel(handles.axes3,'t (s)'); ylabel(handles.axes3,'Speed (RPM)'); grid(handles.axes3,'on'); axis(handles.axes3,[0 5 1 850]); axes(handles.axes4); cycle = double(pid); plot(handles.axes4,x_axis1, cycle); title(handles.axes4,'Duty Cycle of the PWM Waveform'); xlabel(handles.axes4,'t (s)'); ylabel(handles.axes4,'Duty Cycle (%) '); grid(handles.axes4,'on'); axis(handles.axes4,[0 5 1 100]);

  27. Future Additions – Engine Side • Acceleration Control • Adjustable Feed Forward control with different types of input commands: combos of ramps, steps, and parabolic. Load changes can simulate hills and different road conditions. • CAN Bus Interface • Use the DSP board’s CAN bus to send data between the boards. This would allow for a main GUI to control both sides of the system. • Data Logging Feature • Allow for a user to tune controllers and compare results. Could implement a new EE431 / 432 homework or design project around the system. • Set Control Points for Thermal and Engine Response • Set desired temperature for a change in the coolant as well as a engine RPM governor based on load conditions

  28. Hardware Interfacing

  29. Variable Resistance Anti-aliasing filter

  30. Use PWM to drive Pump/Fan Interface from digital to analog Average Voltage seen by the device

  31. Opto-Isolator TIP120 choice Design for 3A Opto-Isolator

  32. LPF to ‘DC’ the PWM Ideal Op Amp theory Voltage @ Input = Voltage @ Pump Opto-Isolator

  33. DSP/Simulink Data-Logging

  34. Simulink Data-Logging Conversion of A/D Value to Temperature Excel Trendline

  35. Simulink Data-Logging Conversion of A/D Value to Temperature Excel Trendline

  36. Simulink Data-Logging Conversion of A/D Value to Temperature Excel Trendline

  37. Simulink Data-Logging Conversion of A/D Value to Temperature Excel Trendline

  38. Simulink Data-Logging cont. Datatype conversions Function auto-code generated

  39. Simulink Data-Logging cont. Datatype conversions Function auto-code generated

  40. Logging The Data

  41. Model vs. Actual

  42. Final Simulink Model

More Related