# ECE 486 Control Systems Lab (Fall 2017)

 Day 1 Day 2 Day 3 Day 4 Short labs, weekly Day 5 Day 6 Day 8 Long labs, biweekly Day 7 Day 9 Day 10 Day 11 Final project, weekly

## Week 3 – Final Project: Reaction Wheel Pendulum

Day 101 of ECE 486 Lab, Week 3 of Final Project.

### What Chapters Should We Complete during Third Week?

Update: The effective due date for demos has been changed from Dec 15 to Dec 14, the same day as the last lab and Reading Day.

#### Chapter 4 (Second Half)

For the two state feedback controller, we choose the first two states out of four of the state vector $x = (\delta \theta_p, \dot{\theta}_p, \delta \theta_r, \dot{\theta}_r)^T$, i.e., we build control effort based on pendulum position and pendulum speed information.

As for the three state feedback controller, we add one extra piece of information which comes from rotor speed, i.e., we feed back $\dot{\theta}_r$. Placing the desired pole location at $0$ for the remaining fourth state $\delta \theta_r$ means we do not regulate rotor position, which further implies rotor can rotate freely.

The linear state feedback controller is of the form $u = -K x$, which reads control is the negative linear combination of internal states under the rule of $K$. Each component of $K$ gives the weight of different state $x_i$.

Thus, in order to build the correct controller, we need first to recover the internal states $x_i$’s based on encoder readings $\varphi_p$ and $\varphi_r$. Then use the computed $K$ by place command to implement $u = -K x$ as desired.

We can do this in simulink component-wise as in $u = -\sum_i K_i x_i$ or using only one gain block, one mux block and set gain block in Matrix K*u mode.

#### Chapter 5

The only difference between this chapter and Chapter 4 is the addition of an observer block. Taking out observer block, we are basically looking at a diagram of Chapter 4. Therefore, there is no need to change controller design $K$.

 Chapter 4 Chapter 5 $u = -K x$ $u = -K \hat{x}$ true state based estimates based

The above Table 1 says controller in the previous chapter was based on true state while as current design on estimation of true state. In both cases, the combination rule $K$ stays the same.

It is the job of the working observer to generate usable estimates.

### A Few Suggestions

• A recap of suggested schedule of Final Project,

 Week 1 (Oct 30) Complete Chapter 1 - 2 Week 2 (Nov 30) Complete Chapter 3 - 4 (first half) Week 3 (Dec 7) Complete Chapter 4 (second half) - 5 Week 4 (Dec 14) Complete Chapter 6 - 7 or catch-up
• Important: A TA is not supposed to give “hand-holding” guidance during the period of students’ Final Project. There is no constraint on how fast or how much work each group needs to complete each week. Students can go as fast as they wish. But it is always strongly recommended that students document their work each week and write up pieces of Final Project Report on the go. Start typesetting Final Project Report one day before it is due is the very first thing each group should avoid.
• There is no official template for the report so students are free to design their own. However all questions in the guidelines should be responded to with clear answers; these are the minimum requirements of the report.
• Since we are going to use Simulink™ Windows Target®, it is not a good idea to run your files from a network path. For example, you may need to create a folder named after your NetID in local C:\ drive and save your Matlab WinTarget files there. Move the folder to your thumb drive once you are finished.

Always keep C:\ drive clean and organized.

• To protect the RWP module, make sure power cords and data cable are firmly plugged in before turning on the power strip.
• As for exporting data, a scope block is recommended. To save data, click the gear icon (options) then go to Logging tab and name your data variable. Use Save format Array.
• Each time you are done with the RWP, you are supposed to restore the RWP back to the cabinet; you can work on the final project any time you want but you are not supposed to take it outside the lab.
• Always clean up before exiting. Specifically,
• Clean up bench table, restore pot, motor lock etc, reinstall screws;
• Sort out wires color by color, type by type and put them back to racks;
• Turn off oscilloscope, meters etc;
• Restore chairs.

## Follow-up

There is only one official lab session left, which is on next Thu (Reading Day, but I will run our lab session.) And one session of office hours is remaining, on next Mon 3pm – 5pm. Please start/continue writing your Final Project Report and it is due by 5pm, Dec 18 in the dropbox in lab 3077 ECEB.

### Due Date

Demos should be finalized by 5pm on Dec 14 (updated) and Final Project Report is due 5pm on Dec 18. Final Project Report must be typeset.

### Questions

You are always very welcome to stop by office hours on Mondays. Emailing questions is another way. You can always include [ECE486]blah in the title of your question emails.

Spot any typos? Email me at once. You will earn up to +5 points for each typo/technical error reported.

## Footnotes:

1
There are only two lab sessions left including this one.

Last updated: 2017-12-07 Thu 22:11