1ECE 495 – Integrated System Design I
ECE 495 - INTEGRATED SYSTEMS I
Engineering Project Planning
Timothy Burg
2ECE 495 – Integrated System Design I
Career Note – The Five Things Job Recruiters Want From You Now
Recruiters are looking for people with strong records of accomplishment who stand out from others
– Expertise - What special skills do you have?– Success stories - Explain the value you've provided in the past and can
offer in the future.– Recommendations – Colleagues that can explain your concrete
contributions and value to specific projects – Work samples - Examples of what you've done are far more effective
than just talking about what you've done, e.g., websites or pictures.– A consistent message. Your résumé, cover letter, website, LinkedIn
profile and interview remarks should all promote a consistent message– From BMW : Good Grades with practical experience (“grease under
your finger nails”), Coop experience
http://www.forbes.com/2010/06/09/job-recruiters-pointers-leadership-careers-employment.html
What can you do to strengthen your resume?
3ECE 495 – Integrated System Design I
Career Note – The Five Things Job Recruiters Want From You Now
A few suggestions – (taking the recommended classes is the minimum you can do to get your degree)
– Join a research project (Faculty Research, Creative Inquiry, Robotics Team, ME Battle Bot Team, etc.)
• Success stories, Recommendations, Work Samples– Take extra classes
• Expertise, Success stories (if the course has a large project)– Do well in ECE495, make a good website
• Expertise, Success stories, Recommendations– Do well in your remaining courses
• Show a positive slope in your grades, you are on an increasing trajectory
– Summer Research Project (REU)• Success stories, flexibility
No magic solutions, make a plan to improve your resume.
4ECE 495 – Integrated System Design I
Career Note – The Five Things Job Recruiters Want From You Now
Get to know a faulty member.
ECE 495 – Integrated System Design I
Note about Personality Profiles HW
Computer Programmer
Electrical Engineer
Lawyer
Artist
Social Worker
47
4 3
3
2
2
1
1
1
1
1
1
Spring 2013
ECE 495 – Integrated System Design I
Note about Personality Profiles HW
Extraversion 48 iNtuition 51 Thinking 64 Judging 83Introversion 52 Sensing 49 Feeling 36 Perceiving 17
Your group probably has a similar distribution, work to incorporate everyone’s talents
ECE 495 – Integrated System Design I
Design Example: Airbus A350
A six-month delay in the launch of Airbus’s A350XWB jet cost parent company EADS (European Aeronautic Defense and Space Company) NV $273-million in the third quarter of 2011.
Scheduling is a critical part of any design project.
8ECE 495 – Integrated System Design I
Generic Design Process
All activities in the design process should be planned.
IdentifyNeed Research
Requirements
Concepts
Design
Prototype
Testing
Retire
Maintain
Use by Customer(s)
Distribute and Sell
Manufacture
9ECE 495 – Integrated System Design I
Engineering Project Management
• If you fail to plan, then you plan to fail.• Industrial Scheduling Tools
– Work Breakdown Schedule (WBS)– GANTT Chart
• Illustration of the WBS through a visual display of project task durations
– Network Diagram• Illustration of the WBS through a visual display of a
task dependencies
10ECE 495 – Integrated System Design I
Work Breakdown Schedule (WBS)
• Activity = Task + Deliverable– Tasks are actions that accomplish a job– Deliverables are the outcome of the task
• WBS describes– Work to be done– Time frame for completion– Resources needed– Responsible person– Predecessors or dependencies– Checkpoints
For planning, you need to know:What has to be done?Who will do it?When will they finish?
Design a timing circuit
11ECE 495 – Integrated System Design I
Example: Design a Robotic Arm for an Underwater Vehicle
High-level view of “Work to be done”
12ECE 495 – Integrated System Design I
Example: Design a Robotic Arm for an Underwater Vehicle
More Details of “Work to be done”Define Deliverables
Deliverable
13ECE 495 – Integrated System Design I
Example: Design a Robotic Arm for an Underwater Vehicle
Time frame for completionResources neededPredecessors or dependencies
Constraints limiting when an activity can begin (weather, resources, ..)
Can’t start some activities until others finish
Must complete WBS for the entire project
14ECE 495 – Integrated System Design I
Work Breakdown Schedule (WBS)
• Estimating time and resources is a difficult task• Routine tasks are well known and quantified
– Solder 16 wire cable to a connector– Replace fan motor
• New tasks are more difficult to estimate. How long does it take to perform the following tasks?– Design a small user interface with 3 data fields and
4 buttons?– Write a 10 line C++ function?– Purchase a socket wrench
15ECE 495 – Integrated System Design I
Work Breakdown Schedule (WBS)
• US Navy developed probability model to estimate the duration of a task:
ta = most optimistic
tm= most realistic
tb=most pessimistic
4
6a m b
e
t t tt
• How long did it take your group to install Simulink and C++ and then perform the first analog loopback?
4 1 4 1.5 41.8
6 6a m b
e
t t t hr hr hrt hr
16ECE 495 – Integrated System Design I
Work Breakdown Schedule (WBS)
• The WBS alone is not very “user friendly”
It would be difficult to manage a team working on a complex project based on this table alone.
17ECE 495 – Integrated System Design I
Gantt Chart
• Graphically represents the Work Breakdown Schedule and the Timeline
• Bars show length of task• Connections show dependencies between tasks.• Software: VISIO, MS Project, OpenGantt
18ECE 495 – Integrated System Design I
Example: Design a Robotic Arm for an Underwater Vehicle
Start of activity
Dependency: can’t start this task until three others finish
Tasks and milestones from WBS
Insight”: any change in 3rd task affects the 4th task
Time (hours, days, years)
Length of activity
Insight: Could delay the start of the 1st task or take longer without affecting the 4th task
19ECE 495 – Integrated System Design I
Network Diagram
• Graphically represents the Work Breakdown Schedule
• A directed graph representation of activities and dependencies
Task ID
Duration
Task Flow
20ECE 495 – Integrated System Design I
Network Diagram
• Critical path : – The series of tasks that must be completed on
schedule for a project to finish on schedule. – Minimum time to complete the schedule– Any delay in the critical path will delay the
project.14 days
15 days
21ECE 495 – Integrated System Design I
Network Diagram
• Example Critical path (d=day)
20d
8d
15d
16d
19d
1.13d
1.2.14d
2.31d
3.13d
3.24d
3.35d
3.46d
1.2.25d
2.16d 15d
Insight: Need to carefully manage the red path because it will directly delay the project
22ECE 495 – Integrated System Design I
Example: Design a Robotic Arm for an Underwater Vehicle
Red boxes and lines indicate the Critical Path to Identify NeedThe surveys and Market Analysis could take longer without extending the projects.
23ECE 495 – Integrated System Design I
Example: Design a Robotic Arm for an Underwater Vehicle
“Slack” or “Float” is the maximum delay in activity before it affects the critical path.
24ECE 495 – Integrated System Design I
Summary
• Time Management Tools– Work Breakdown Schedule– Gantt Chart– Network Diagram
Project management is another important element of the design process.
These are very similar and most software let you switch between views
25ECE 495 – Integrated System Design I
Project 6 WBS
26ECE 495 – Integrated System Design I
Project 6 WBS
27ECE 495 – Integrated System Design I
Project 6 WBS
28ECE 495 – Integrated System Design I
Project 6 Gantt Chart
29ECE 495 – Integrated System Design I
ECE495 Webpage
All equipment manualsProject
detailsIndividual Assignments
30ECE 495 – Integrated System Design I
Project 1 – Laser Cut Part
• Laser Cutter Process– Download Template– Draw interesting pattern in 4” square– Submit to Ran by Friday– Meet TA in 403 Rhodes to use cutter
31ECE 495 – Integrated System Design I
Project 1
• Configure hardware• Test analog loopback• Test other loopbacks• Test incremental (Q4 only counts increments from the
point it is switched “on”) quadrature encoder input• Report due on next Friday
32ECE 495 – Integrated System Design I
HIL in the loop
Li Ri v
Model of a DC Motor
Control Algorithm
Simulink Program
Target Computer
Analog Out
Encoder In
DC Motor
AmplifierQ4
Simulation
HIL Simulation
33ECE 495 – Integrated System Design I
Real-time Control
34ECE 495 – Integrated System Design I
Hardware-in-the-Loop (HIL) System
Can’t model all of the subsystems to build a complete simulation
Physical
Computer simulation of a system containing connected subsystem models
Input SignalsA complex physical subsystem that can’t be effectively modeledConvert
A/D, Buffer
ConvertD/A, Buffer
Input Signals
Simulated
HIL Simulation is a hybrid simulation that incorporates real components
35ECE 495 – Integrated System Design I
Hardware-in-the-Loop (HIL) System Example
To determine which ABS module would be best without actually building a car and testing each different module, simulate the car’s dynamics, test different controllers, and analyze simulated response of the car to real ABS braking signals.
HIL Card
Braking SignalsComputer simulation of a car including vehicle dynamics, tire models, driver models, etc.
Anti-Lock Brake Module
Car State Signals(speed, driver command)
A complex physical system that can’t be effectively modeled
Need hardware and software
36ECE 495 – Integrated System Design I
Open-loop Control System
Open-loop control:• Input designed to move the system to a desired state based on current
conditions and model of the system.• Example: Fill a water tank to a specified level based on flow-rate and time.
• If some of the water evaporates during filling then the level will be wrong
• If flow rate is not exactly as expected then the level will be wrong.• Inaccurate time will lead to the wrong level
Desired level
Actual level
No correction for errors
37ECE 495 – Integrated System Design I
Closed-Loop Control System
Closed-loop control:• Input changes as the error, difference between the desired output and the
measured output, changes.• Example – fill a tank to a specified level based on measuring the tank level
and turning flow “on” or “off” to reach the desired level.• Anything that prevents the tank from being filled to the desired level
will be compensated.
Desired level = Actual level
SystemOutput
Feedback
Desired level
+_
Input Error = Desired Level – Measured
Measurement
38ECE 495 – Integrated System Design I
Real-time (RT) System
Computer-based execution of a program loop:
Instructions or algorithm
System
Speed and predictability of execution times distinguish RT and non-RT systems
Real-time system: the correctness of the system behavior depends not only on the logical results of the computations, but also on the physical instant at which these results are produced.
http://www.ece.cmu.edu/~koopman/des_s99/real_time/
input outputτ, response time
39ECE 495 – Integrated System Design I
Closed-Loop Control as a RT, HIL Simulation
Amplifier
Motor
If you were using closed-loop control on the position of the motor, you would want the motor to stop at a certain shaft angle.
HIL Card
Motor Position (encoder)
Control Algorithm (like you are learning in ECE409)
Voltage
PhysicalSimulated
40ECE 495 – Integrated System Design I
Implementing Closed-Loop Control as a RT, HIL Simulation in ECE495
SystemOutput
Feedback
+_
Input
Target PC • xPC OS from
Mathworks• Q4 HIL Board
Simulation
A/D,D/A, Buffer
41ECE 495 – Integrated System Design I
Implementing Closed-Loop Control as a RT, HIL Simulation in ECE495
SystemOutput
Feedback
+_
Input
Target PC • xPC OS from
Mathworks• Q4 HIL Board
Host• MATLAB with
Simulink• C++
• Programming Interface to Target PC• User Interface• Execute High-level Programs
42ECE 495 – Integrated System Design I
Implementing Closed-Loop Control as a RT, HIL Simulation in ECE495
MATLAB/SIMULINK have a toolbox called xPC Target
43ECE 495 – Integrated System Design I
Implementing Closed-Loop Control as a RT, HIL Simulation in ECE495
Design a Simulink model on the host PC
Program is downloaded to target for real-time execution
Boot CD installs a real-time kernel on target
Build the Simulink model Host and target coordinate for downloading programs
Some parameters can be changed on host. This change is communicated to target.
Host Computer Target ComputerWorkflow
44ECE 495 – Integrated System Design I
Implementing Closed-Loop Control as a RT, HIL Simulation in ECE495
• 4 x 14 bit Analog Inputs• 4 x 12 bit D/A Outputs• 4 Quadrature Encoder Inputs• 16 Programmable Digital IO
Channels• 2 x 32 bit dedicated Counter/ Timers• 2 External Interrupt sources• 32 bit, 33MHz PCI Bus Interface
Quanser Q4 card in the Target PC
Terminal board
45ECE 495 – Integrated System Design I
Implementing Closed-Loop Control as a RT, HIL Simulation in ECE495
Analog Out (D/A)
Channels
Ext Interrupt and Signal Pins (PWM,Watchdog)
Analog In (A/D)
Channels
Encoder
Channels
Digital I/O Ports
From Q4 board
Q4 Terminal Board
46ECE 495 – Integrated System Design I
Why MATLAB/SIMULINK over C++?
• MATLAB is a huge collection of C/C++ libraries for system prototyping and hardware interfacing.
• No need to reinvent the wheel! Would you rather spend weeks writing device drivers and libraries for the Q4 than test your system in a few hours?
• Prototyping ideas is easy and fast.
• Visualization of data is easy.
47ECE 495 – Integrated System Design I
Final Note - Response to comment
• EEs believe these are "computer" projects. This could not be much further from the truth; we use high-level tools like Simulink so that it does NOT become a computer project.
• There is a local culture that EEs don't program. In almost every industrial, military, financial, civil, medical, political … endeavor, the automated gathering, processing, and use of data have created significant breakthroughs.
• For example, the conservative field of power generation and distribution has become a "computer" problem in the sense that "A smart grid is an electrical grid that uses information and communications technology to gather and act on information, such as information about the behaviors of suppliers and consumers, in an automated fashion to improve the efficiency, reliability, economics, and sustainability of the production and distribution of electricity. [Wikipedia]“
• My hope is that you appreciate that automation tools (like the image processing functions in MATLAB) can enable you to apply your expertise in power systems, communications, robotics, electronics, electromagnetics, etc. to create new solutions.
48ECE 495 – Integrated System Design I
Extra Slides
49ECE 495 – Integrated System Design I
Real-time Closed-loop Control
Typical response times and the applications which need them …
Seconds : Temperature, pressure, and flow control; aircraft control
Milliseconds (control with < 1 kHz): Productions lines, motor control, robot control
Microseconds : High speed test stands, fast digital controllers, control with 5 kHz – 500 kHz
50ECE 495 – Integrated System Design I
How is a Real-time System formulated?
More generally, to Relate Theory to Application
ContinuousProcess
DigitalSystem
Model ofContinuousProcess
1. Want to measure or control this process
2. Use engineering tools to model the process using continuous or fixed sample time discrete models(For example ECE409, ECE 467)
3. Formulate interaction algorithms based on the models(For example ECE409, ECE 467)
4. Execute algorithms(assume a continuous system can be approximated by a “fast” digital system)
Design
Error if execution timing doesn’t match assumptions in model and algorithms - results are not predictable.
51ECE 495 – Integrated System Design I
Classification of Real-time Systems
http://www.ece.cmu.edu/~koopman/des_s99/real_time/
Real-time System
Soft Hard
Dynamic Static
System must remain synchronous with the state of the environment.
Degraded operation in a rarely occurring peak load can be tolerated.
Timing parameters for the system are set during compilation.
Timing parameters and the priority for tasks is modified at run-time.
52ECE 495 – Integrated System Design I
HardReal-timeSystem
SoftReal-timeSystem
Example: Produce a sinusoid output
D/A
D/A
Error in output waveform
Error in execution time
Classification of Real-time Systems
53ECE 495 – Integrated System Design I
Examples of Real-time Systems
QUARC from QuanserSoft Real-time System using PC with Windows
QUARC from QuanserHard Real-time System using QNX
54ECE 495 – Integrated System Design I
Which system would you use in ECE 495?
Real-time System
Soft Hard
Dynamic Static
Systems
Non-Real-time System
Speed and predictability are both critical
Response to input has to come at a precise time
System timing parameters are known before execution
In ECE 495, we use a Static, Hard Real-Time System
55ECE 495 – Integrated System Design I
A final thought …
The Q4 cards being used for data acquisition and control are very useful… and very expensive. Read the manuals for voltage limitations and proper use.
56ECE 495 – Integrated System Design I
The utility of MATLAB Simulink
MATLAB/Simulink are used to prototype, simulate and visualize performance of systems.
Math model of system
MATLAB Simulink Model
Visualization: Plots, Scopes, etc.
57ECE 495 – Integrated System Design I
Using C/C++ Code in MATLAB
• MATLAB allows the use of user defined C/C++ executables (MEX files) to augment functionality.
• Computationally expensive tasks can be carried out using C and data can be sent to MATLAB. E.g. Camera interfacing for image processing.
• Specific manipulation of data can be programmed into a user defined function (called the S-function) in Simulink. S-functions are C-code snippets embedded in the Simulink environment.