hardware and software co-design for motor control applications · no experience designing fpgas!...

21
1 © 2015 The MathWorks, Inc. Hardware and Software Co-Design for Motor Control Applications Stephan van Beek

Upload: others

Post on 22-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

1© 2015 The MathWorks, Inc.

Hardware and Software

Co-Design for

Motor Control Applications

Stephan van Beek

Page 2: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

2

Punch Powertrain develops complex SoC-based motor control

▪ Powertrains for hybrid and electric vehicles

▪ Hardware choice through simulations

▪ Traditional microcontroller too slow

▪ No experience designing FPGAs!

Link to video

✓ Designed integrated E-drive: Motor, power electronics and software

✓ 4 different control strategies implemented

✓ Done in 1.5 years with 2FTE’s

✓ Models reusable for production

✓ Smooth integration and validation due to development process

Page 3: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

3

Key trend: Increasing demands from motor drives

Page 4: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

4

Systems-on-Chip for motor and power control

Page 5: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

5

Key Trend: ~60% FPGA projects contain embedded processors

Page 6: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

6

Challenges in using SoCs for motor and power control

?

?

Page 7: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

7

?

Why use Model-Based Design to develop motor control

applications on SoCs?

??

Page 8: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

8

Load motor

Motor under test

(with encoder)

ZedBoard

FMC module:

control board +

low-voltage board

Mechanical

coupler

Zynq SoC (XC7Z020)

Page 9: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

9

Page 10: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

10

Embedded System

SoC

Hard Processor

Linux / VxWorks

Reference

Framework

Programmable

Logic

Reference

Framework

System Simulation Test Bench

Conceptual workflow targeting SoCs

Model of

Motor &

Dyno

Motor &

Dyno

Hardware

SoC

Programmable

Logic

Algorithm

HDL

Code

Algorithm

C

Code

Algorithm

C

Model

Algorithm

HDL

Model

Algorithm

developer

Hardware

designerEmbedded

software

engineer

Page 11: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

11

Hardware/software partitioning

Target to ARM

Target to

Programmable

Logic

Page 12: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

12

Bette

rW

ors

e

Syste

m B

ehavio

r

Implementation EfficiencyBetterWorse

Failure

Target

constraints

Precision

Thresholds

Efficient embedded designs

Considerations

- Design Time

- Resource usage

- Flexibility

- Ease of design

- ….Infeasible

Target

constraints

Precision

Thresholds

Page 13: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

13

Floating point to Fixed-Point made easy

Convert to Fixed-Point at lowest

implementation cost but still meeting

system level specifications

Tolerance specification to

guide Fixed-Point conversion

Page 14: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

14

Automatic Fixed-Point optimization

Trade-off Fixed-Point versus

Floating Point types

Automatic validation of compliance

to tolerance specifications

Page 15: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

15

Code Generation

AXI

Page 16: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

16

Page 17: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

17

How are you going to debug your FPGA designs?

Some of the things you have to worry about:

▪ How to capture high-rate or internal signals

▪ How to analyse my data?

▪ Can I automate this?

▪ Are my measurements reproducible?

Page 18: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

18

Integrate debugging with MATLABFPGA Data Capture

MATLABJTAG

Automating the analysis of

large datasets

Reproducing real-world

scenarios in simulation

Easy access to internal

FPGA signals

Page 19: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

19

ChallengeDesign and implement a robot emergency braking system with minimal

hardware testing

SolutionModel-Based Design with Simulink and HDL Coder to model, verify, and

implement the controller

Results▪ Cleanroom time reduced from weeks to days

▪ Late requirement changes rapidly implemented

▪ Complex bug resolved in one day

Link to user story

“With Simulink and HDL Coder we eliminated

programming errors and automated delay balancing,

pipelining, and other tedious and error-prone tasks.

As a result, we were able to easily and quickly

implement change requests from our customer and

reduce time-to-market.”

Ronald van der Meer

3T

A SCARA robot.

3T Develops Robot Emergency Braking System with

Model-Based Design

Page 20: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

20

Key Takeaways

Meet stringent requirements

and reduce costs

Manage design complexity and improve team collaboration

Reduce hardware testing

time up to 5x

Page 21: Hardware and Software Co-Design for Motor Control Applications · No experience designing FPGAs! Link to video Designed integrated E-drive: Motor, power electronics and software 4

21

How to get started?

Public

On-Site

▪ Embedded Systems

▪ DSP for FPGA Design

▪ Xilinx Zynq SoCs