Sie sind auf Seite 1von 44

Algorithm to Implementation: Combining MATLAB and

Simulink with PSpice to Streamline PCB design


Corey Mathis, MathWorks
Kishore Karnane, Cadence
Alok Tripathi, Cadence

Date
Cadence and MathWorks Partnership

What Why How


Cadence and MathWorks Prior to this integrated Co-simulate entire system-
partner to provide System- solution, customers level design to achieve
Level simulation for: simulated their design faster results in a less
IoT blocks independently error-prone process
Medical
Automotive No feedback from one Analysis capabilities key
system into the other for IoT and automotive
Electronics circuits customers concerned for:
designed in PSpice Manual efforts for running Reliability
simulations in both Cost,
Electro-mechanical and environments separately. Productivity,
behavioral models created Manufacturing yield
in Simulink Very time consuming and
error prone etc

2 2017 Cadence Design Systems, Inc. All rights reserved.


AGENDA

Challenges in PCB Design

Introducing PSpice Systems Option

Summary

3 2017 Cadence Design Systems, Inc. All rights reserved.


Challenges in PCB Design

Limited analog SPECIFICATION Specification


design isolated from
abstractions verification

IMPLEMENTATION IMPLEMENTATION
Design trade-
offs difficult Digital Analog

C/C++
SPICE

TEST & VERIFICATION


No run-time HDL
analog/digital
links

Slow design INTEGRATION


iterations Disconnected
Digital Analog
Hardware Hardware teams

4 2017 Cadence Design Systems, Inc. All rights reserved.


Model-Based Design

RESEARCH REQUIREMENTS Executable Specification


DESIGN
Simulink as multi-domain simulation
Environment Models environment
Digital Models Analog Models
Time-continuous and time-discrete (sampled)

TEST & VERIFICATION


Timing and Control Logic

Algorithms Event-triggered
Mathematical and physical algorithm modeling
IMPLEMENTATION
Robustness through environment modeling
HDL C/C++ SPICE

FPGA ASIC MCU DSP Silicon


Auto code generation (C/C++, HDL)
TEST

Continuous Verification
SYSTEM

INTEGRATION

5 2017 Cadence Design Systems, Inc. All rights reserved.


Model-Based Design for PCB

Top-Down Workflow

TEST & VERIFICATION


RESEARCH REQUIREMENTS

Starting point:
DESIGN
Mathematical Model
Environment Models
Physical Model
Digital Models Analog Models

Timing and Control Logic


Needs
Algorithms
Simulation speed (proof of concept)
Reuse of existing testbench
IMPLEMENTATION Sign-off Transistor-level simulation
HDL C/C++ SPICE

FPGA ASIC MCU DSP Silicon


Solution
Co-simulation with Simulink and PSpice
TEST
SYSTEM

using PSpice Systems Option


INTEGRATION Model integration through automatic C
code generation and PSpice DMI

6 2017 Cadence Design Systems, Inc. All rights reserved.


Step 1: Algorithm and System Design

Time-discrete Physical Models of


PWM Mechanical
Generator Load Scenarios

Time-continuous
PI Controllers
(speed, current)

Physical Models of
Electrical Components

7 2017 Cadence Design Systems, Inc. All rights reserved.


Step 1: Algorithm and System Design

Load Scenario: with Load


8 2017 Cadence Design Systems, Inc. All rights reserved.
Step 2: Model Elaboration

Load Scenario: with Load and Vibration


9 2017 Cadence Design Systems, Inc. All rights reserved.
Step 3: Implementation

IGBT

10 2017 Cadence Design Systems, Inc. All rights reserved.


Step 4: Verification

PSpice Systems
Option
Co-Simulation
Interface

11 2017 Cadence Design Systems, Inc. All rights reserved.


Step 4: Verification

Simulink / PSpice
Co-Simulation
Simulink Simulation (PSpice Systems Option)

wm_ref, wm
Te [Nm]
Vs_abc [V]
Is_abc [A]
12 2017 Cadence Design Systems, Inc. All rights reserved.
MATLAB/Simulink and PSpice for System Level Simulation

MATLAB & Simulink


MATLAB/Simulink
Multi-domain simulation environment for dynamic systems
Algorithm development and verification platform

PSpice
SPICE-based simulator
Simulation of electrical and electronic circuits
Circuit design platform Hardware

14 2017 Cadence Design Systems, Inc. All rights reserved.


AGENDA

Challenges in PCB Design

Introducing PSpice Systems Option

Summary

15 2017 Cadence Design Systems, Inc. All rights reserved.


Introducing PSpice Systems Option

Evaluate
PSpice-MATLAB
MATLAB
Visualization
functions in PSpice
Interface

PSpice
Systems
Option

MATLAB Import MATLAB


Simulink PSpice module as
co-simulation simulation model in
interface. PSpice using
PSpice DMI

16 2017 Cadence Design Systems, Inc. All rights reserved.


PSpice Systems Option

Evaluate
PSpice-MATLAB
MATLAB
Visualization
functions in PSpice
Interface

PSpice
Systems
Option

MATLAB Import MATLAB


Simulink PSpice module as
co-simulation simulation model in
interface. PSpice using
PSpice DMI

17 2017 Cadence Design Systems, Inc. All rights reserved.


PSpice MATLAB Visualization Interface

Extending PSpice Waveform Analysis


Leverage MATLAB Visualization capability
from PSpice

Evaluate MATLAB function in PSpice


In PSpice Measurements
In PSpice Models

18 2017 Cadence Design Systems, Inc. All rights reserved.


Leverage MATLAB Visualization Capabilities
Visualize different types of plots
Complete and seamless access to MATLAB plotting capabilities
Single click export of simulation results to MATLAB
Customize waveform processing on export
Run own custom MATLAB script on exported data

Extend PSpice waveform analysis capabilities


Frequency Domain Analysis - Polar plots
Transient and DC Sweep Analysis - 3 D plots

19 2017 Cadence Design Systems, Inc. All rights reserved.


User Flow: Viewing PSpice Results in MATLAB

Select mode
Select Trace/Traces
View result in MATLAB
Can configure MATLAB
script
Process DATA in MATLAB
Customize plot in MATLAB

20 2017 Cadence Design Systems, Inc. All rights reserved.


Example Draw Polar Plots on Transient Analysis

21 2017 Cadence Design Systems, Inc. All rights reserved.


Example Draw Polar Plots on AC Analysis

22 2017 Cadence Design Systems, Inc. All rights reserved.


Example Plot multiple B-H loops

Variation against air


gap

Variation against
DC bias

23 2017 Cadence Design Systems, Inc. All rights reserved.


Example DC Sweep at Multiple Temperature

24 2017 Cadence Design Systems, Inc. All rights reserved.


PSpice Systems Option

Evaluate
PSpice-MATLAB
MATLAB
Visualization
functions in PSpice
Interface

PSpice
Systems
Option

MATLAB Import MATLAB


Simulink PSpice module as
co-simulation simulation model in
interface. PSpice using
PSpice DMI

25 2017 Cadence Design Systems, Inc. All rights reserved.


Evaluate MATLAB Function in PSpice Measurements
Expressions
PSpice Measurement
Evaluation
Include MATLAB functions for
measurements

26 2017 Cadence Design Systems, Inc. All rights reserved.


Evaluate MATLAB function in PSpice Behavioral Models
Use MATLAB functions in simulation
Include MATLAB functions in controlled sources

27 2017 Cadence Design Systems, Inc. All rights reserved.


PSpice Systems Option

Evaluate
PSpice-MATLAB
MATLAB
Visualization
functions in PSpice
Interface

PSpice
Systems
Option

MATLAB Import MATLAB


Simulink PSpice module as
co-simulation simulation model in
interface. PSpice using
PSpice DMI

28 2017 Cadence Design Systems, Inc. All rights reserved.


PSpice Simulink Co-Simulation - Overview

Combines three best in class simulation tools to provides unmatched


design simulation environment for electrical and physical system together

PSpice - MATLAB - Simulink interface


PSpice - Cadence PSpice is a full-featured analog simulator with support for digital
elements to help solve virtually any design challenge

MATLAB - The language and environment for technical computing

Simulink - Platform for multi-domain simulation and model-based design of dynamic


system

29 2017 Cadence Design Systems, Inc. All rights reserved.


Analog/Mixed-Signal Design

Example: Field-oriented Control of a Permanent-Magnet-Synchrone-Machine


This control technique is common in motor rive systems for hybrid electric
vehicles, manufacturing machinery, and industrial automation

vexp
Field-Oriented Power
PWM PMSM
Controller Inverter
Load
I
v

Digital Analog Electro-mechanical

30 2017 Cadence Design Systems, Inc. All rights reserved.


PSpice Simulink Co-Simulation - Benefits

Co-simulate electrical, mechanical, and systems

Simulate with ideal models for faster simulation

Simulate with actual electrical designs using PSpice models

Electrical simulations with PSpice models exhibit non-linearities, delay, and


other real-world effects

Full access to PSpice and MATLAB environments for in-depth design and
debugging and visualizing data

31 2017 Cadence Design Systems, Inc. All rights reserved.


Detailed Level PMDC Brushed DC Motor Co-Simulation

Detailed level radiator fan motor system simulation model


32 2017 Cadence Design Systems, Inc. All rights reserved.
PSpice Simulink Co-Simulation High Level User Flow

Initial block level


implementation in
Simulink

Implement
Electronics with
PSpice

Integrate these
together using
PSpice CoSim

Fine tune design for


various operating
conditions
33 2017 Cadence Design Systems, Inc. All rights reserved.
PSpice Systems Option

Evaluate
PSpice-MATLAB
MATLAB
Visualization
functions in PSpice
Interface

PSpice
Systems
Option

MATLAB Import MATLAB


Simulink PSpice module as
co-simulation simulation model in
interface. PSpice using
PSpice DMI

34 2017 Cadence Design Systems, Inc. All rights reserved.


Device Modeling Interface

Digital
Devices
Analog
Behavioral DMI Model Code
Devices
Physical
Devices

Communicating with C/C++, SystemC, VerilogA,


PSpice Simulator PSpice MATLAB, Simulink

35 2017 Cadence Design Systems, Inc. All rights reserved.


Device Modeling Interface Embedded Coder Steps

Generate Generate Device Compile Associate


C++ Code User Information and debug PSpice
for Simulink and register with generating model with
Model Engine Function DLL, LIB symbol and
Simulate

Requires Embedded Coder license

36 2017 Cadence Design Systems, Inc. All rights reserved.


Simulink Model

37 2017 Cadence Design Systems, Inc. All rights reserved.


Simulink-PSpice Target Configurations

Custom DMI
Wrapper Code
Template

38 2017 Cadence Design Systems, Inc. All rights reserved.


PSpice Simulation

39 2017 Cadence Design Systems, Inc. All rights reserved.


Mixed-signal Models

40 2017 Cadence Design Systems, Inc. All rights reserved.


AGENDA

Challenges in PCB Design

Introducing PSpice Systems Option

Summary

41 2017 Cadence Design Systems, Inc. All rights reserved.


Summary

PSpice Systems Option is a needed tool because of:


Introduction of newest technologies and efficient methods
Possibility to verify and optimize SW-Algorithms with HW-Models
Reconnaissance and compensation of errors during the specification
and implementation reducing development time

MATLAB/Simulink and PSpice Co-Simulation


System Level Simulation importing C/C++/SystemC and Simulink
Blocks into a unique simulator
Hardware in the Loop, getting the results in a completely reliable
environment to test the new critical functions
42 2017 Cadence Design Systems, Inc. All rights reserved.
Demo

43 2017 Cadence Design Systems, Inc. All rights reserved.


Summary

Q&A
MathWorks Contact:
Corey Mathis Corey.Mathis@mathworks.com

Cadence Contacts :
Kishore Karnane karnane@cadence.com
Alok Tripathi alok@cadence.com

44 2017 Cadence Design Systems, Inc. All rights reserved.


2017 Cadence Design Systems, Inc. All rights reserved worldwide. Cadence, the Cadence logo, and the other Cadence marks found at www.cadence.com/go/trademarks are trademarks or registered trademarks of
Cadence Design Systems, Inc. All other trademarks are the property of their respective owners.

Das könnte Ihnen auch gefallen