dSPACE Helps UW Through Winter Workshop Difficulties

Failures can yield as much valuable insight as successes, and oftentimes much more.  Moreover, EcoCAR 2 failures can yield help from colleagues and competitors alike.  Such was the case with the University of Washington EcoCAR 2 team’s Hardware-in-the-Loop (HIL) demonstration at the Winter Workshop in Austin.  Controls lead Trevor Crain explains the challenges UW had setting up its dSPACE HIL Simulator to meet the demonstration requirements:

One of the primary Winter Workshop presentations was a demonstration of our team’s progress on control system and HIL development.  The presentation had several components, including a dynamic presentation of our dSPACE HIL running our stock Chevrolet Malibu vehicle model in real time.  The model is set up to simulate all the primary powertrain components on the stock Malibu.  The vehicle model on the HIL was supposed to take hardware inputs from an accelerator pedal and brake switch, then receive commands from our supervisory controller, the dSPACE MicroAutoBox (MABX), over a physical wiring harness.

In addition, the MABX control code needed to respond safely to potential failures in the vehicle to ensure occupant safety and prevent damage to the vehicle components.  These failures may take the form of short circuits in the wiring harness, mechanical failures and a host of other problems.  The goal of designing a fault-tolerant control system is to anticipate these faults and have a supervisory controller that reacts in the safest way possible.  At the workshop, we were supposed to simulate a few of these faults, such as an unreasonable accelerator pedal signal. The control code loaded onto the MABX was designed to recognize this fault, set a fault flag and use that flag to take corrective action.

Unfortunately, just before the workshop our team ran into some of these faults a bit earlier than intended.  We ended up losing our CAN communication channels into the MABX a few days before we shipped the HIL and were not able to diagnose whether the error was due to software or hardware issues before shipping the HIL out.  In the days after shipping, we modified both our code and wiring harness to try and increase our odds of regaining communication once we tested everything at the workshop.

The Winter Workshop was a whirlwind of activity as we tried to get the HIL up and running, prepared for our presentation and attended the training sessions offered by the project organizers and sponsors.  Thankfully, we received a huge amount of help from dSPACE and our mentor, Vince Sabatini.  They were incredibly helpful in trying to get us operational, but unfortunately we ran out of time before we could reestablish communication between the HIL and MABX.  We finally ended up reverting to our last resort plan of presenting our supervisory control code and fault mitigation strategies using MathWorks Simulink. It was a disappointing outcome, but actually served as a good reminder that we always need to be ready for the worst possible scenario and have a plan of action, be it in our control code or in real life. More than that, we learned that we must be more prepared come workshop or competition so that we won’t have to use our worst-case scenario plans.

In fact, the dSPACE members were awesome in helping us figure out where to go post-workshop.  They helped us determine that our harness could use some work and caused a lot of the problems due to shorts in the connectors.  Vince helped us get more used to diagnosing shorts in the harness and working with the hardware, and the workshop presentations were really helpful in learning how to use the software more effectively.

As of right now we’re working on a new, more reliable harness with automotive-grade connectors in addition to setting up a more standardized signal processing blockset in Simulink.  In addition, we spoke a lot with University of Victoria’s controls team at the workshop and have already started swapping ideas and progress updates back and forth.  EcoCAR 2 has a great atmosphere of friendly competition, so we’re starting to really communicate with other teams in an effort to get everyone’s vehicles running in top form by next year.  It’s going to be a tough competition, but with the support from the sponsors, organizers and other schools we’re really looking forward to preparing for the Year 1 finals.