Modeling and Simulation of Photovoltaic Solar Power...

30
1 © 2015 The MathWorks, Inc. Modeling and Simulation of Photovoltaic Solar Power Vehicle Systems using MATLAB and Simulink Jerry Brusher, Ph.D. Education Technical Marketing MathWorks Novi, MI

Transcript of Modeling and Simulation of Photovoltaic Solar Power...

Page 1: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

1© 2015 The MathWorks, Inc.

Modeling and Simulation of

Photovoltaic Solar Power Vehicle Systems

using MATLAB and Simulink

Jerry Brusher, Ph.D.Education Technical MarketingMathWorks – Novi, MI

Page 2: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

4

INTEGRATION AND TESTINTEGRATION AND TEST

IMPLEMENTATION

Embedded

Software HIL System

DESIGNSYSTEM LEVEL DESIGN

Control ElectricalMechanical

REQUIREMENTS

Model-Based Design Process

TE

ST

& V

ER

IFIC

AT

ION Optimize system performance

by developing in a single

simulation environment

Save time by automatically

generating embedded code

Lower costs by using HIL tests

Produce better designs by

continuously comparing design

and specification

Page 3: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

7

Customer Successeswith Model-Based Design

Max Planck

Instituteprotein structure

analysis

EIM Grouphedge fund

management

Lockheed MartinF-35 flight

control

Horizon Windforecasting

& risk analysis

Johns Hopkins

University APLprosthetic arm

development

Texas

Instrumentsadvanced

DSP design

Beth Israel Deaconess

Medical Center

improved MRI

accuracy

General MotorsTwo-Mode Hybrid

powertrain

Page 4: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

8

HEV: System-Level Design & Optimization

Page 5: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

9

Photovoltaic Solar Power Vehicle Systems

DC

Power

Sunlight

PV Panels Motor Drive Vehicle Dynamics

DC

Power

Battery Storage

Charge Controller

Power Inverter

AC

Power

Page 6: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

10

Agenda

Model-Based Design: System-Level Context

Modeling electrical and electronic components

– PV cells, panels, arrays and batteries

– Power converters and inverters

Designing control algorithms for power electronics

– Voltage and current regulation

– Maximum power point tracking (MPPT)

Modeling vehicle dynamics and mechanical components

– Transmission, clutches and tires

Support for Student Competitions

– Software

– Learning Resources

Page 7: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

11

How does a PV cell work?Anatomy of a PV cell

Photogeneration: Short circuit current Isc is proportional to the number of

absorbed photons that cross the pn-junction (when photon energy hn > Egap).

Charge separation: Open circuit voltage Voc depends on the pn-junction

diode-like characteristics, Voc < Egap /q (where q is the elementary charge on

an electron).

anti-reflective layer

p-type

n-type

pn-junction

backplane

0.6 – 0.7 VoltsEgap

Page 8: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

12

p

sNV

IRV

sphR

IRV1)(eIII t

s

Where:

Iph Solar induced current (proportional to irradiance)

Is Diode saturation current (exponential behavior)

N Diode quality factor (emission coefficient)

Vt Thermal voltage kT/q (k: Boltzmann constant, T: device

temperature)

Rp Shunt resistance (models leakage currents, primarily due to

defects)

Rs Series resistance (models bulk and contact resistances)

How does a PV cell work?PV Cell Equivalent Circuit

Page 9: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

13

Model Using Fundamental Approaches

First Principles

Simulink

Physical Components

Simscape

Advanced Components Library

SimElectronics

Page 10: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

14

SimMechanics™

Mechanical dynamics (3-D)

SimDriveline™

Drivetrain systems (1-D)

SimHydraulics®

Fluid power and control

Multi-domain physical systems

Electrical power systems

SimPowerSystems™

SimElectronics™

Electromechanical and

electronic systems

Simscape™

Physical Modeling in Simulink®

Page 11: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

15

Model using experimental test data

Programmable Solar Array Simulator

i.e. Agilent E4360A

Import your test data Generate surface fit for

experimental V-I curves

Use 2D Lookup Table

model in simulation

PV panels under test

or

Page 12: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

16

Curve Fitting Toolbox

Optimization Toolbox

Neural Network Toolbox

System Identification Toolbox

Data Driven Modeling in Simulink®

Page 13: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

17

Photovoltaic Solar Power Vehicle Systems

DC

Power

Sunlight

PV Panels Motor Drive Vehicle Dynamics

DC

Power

Battery Storage

Charge Controller

Power Inverter

AC

Power

Page 14: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

18

Battery Models:

Generic, Pre-Defined

Generic: SimElectronics

– Charge-dependent voltage source

– Parameters found on data sheets

Pre-Defined: SimPowerSystems

– Several pre-defined models

– Full parameterization

– Documentation provides

extensive detail

Page 15: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

19

Battery Models:

Custom Cell

Use supplied components or

build new components via

Simscape language

Battery cell equivalent discharge circuitResistors, capacitor, and voltage source

are dependent upon SOC, DOC,

and temperature

Page 16: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

20

Simscape Language For Modeling

Custom Components

MATLAB-based language,

enabling text-based

authoring of physical

modeling components,

domains, and libraries

– Leverages MATLAB

– Object-oriented for model reuse

– Generate Simulink blocks

– Save as binary to protect IP

Page 17: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

21

Photovoltaic Solar Power Vehicle Systems

DC

Power

Sunlight

PV Panels Motor Drive Vehicle Dynamics

DC

Power

Battery Storage

Charge Controller

Power Inverter

AC

Power

Page 18: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

22

Model DC to DC Power Converters

Construct, test and re-use multiple power electronic

converter topologies quickly and efficiently

Buck (step-down) Converter

Boost (step-up) Converter

Buck-Boost Converter

Page 19: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

23

Model DC to DC Power Converters

Balance model fidelity and simulation speed according

to your needs

SimElectronicsNonlinear simultaneous equations solution

Include temperature effects

SPICE level switching device models

Detailed simulation

SimPowerSystemsPiecewise linear systems solution

Multiphase bridges and pulse generators

Transient and harmonic analysis

Faster simulation

Page 20: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

24

Model DC to AC Power Inverters

Build complex, multi-phase, multi-level inverter circuits using the Universal

Bridge from the SimPowerSystems library

Use the built-in tools in SimPowerSystems to perform harmonic analysis

directly on your simulation model

Use average voltage models or ideal switching algorithms for control

design and faster simulation

Page 21: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

25

Use Simulink Control Design and the Control System Toolbox to linearize

your model and interactively design controllers against requirements in the

time and frequency domain

Once designed, test and verify the performance of your controller against the

nonlinear model

Voltage or Current Regulation

Page 22: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

26

Maximum Power Point Tracking

In general, when a module is directly connected to a load, the operating

point is seldom the MPP

A power converter is needed to adjust the energy flow from the PV

array to the load

Multiple well-known direct control algorithms are used to perform the

maximum power point tracking (MPPT)

Voltage & Current

SensingPWM Generator

MPPT Algorithm + Duty Cycle Adjustment

PV ArrayPower

ConverterLoad

Page 23: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

27

Maximum Power Point Tracking

Incremental Conductance Algorithm Based on the differentiation of the PV array

power versus voltage curve:

The MPP will be found when:

Where I/V represents the instantaneous

conductance of the PV array and dI/dV is the

instantaneous change in conductance.

The comparison of those two quantities tells

us on which side of the MPP we are currently

operating.

dV

dIVI

dV

dIV

dV

dVI

dV

VId

dV

dP

)(

dV

dI

V

I

dV

dIVI

dV

dP 00

Flowchart of the Incremental Conductance MPPT Algorithm

Page 24: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

28

Maximum Power Point Tracking

Incremental Conductance Algorithm Based on the differentiation of the PV array

power versus voltage curve:

The MPP will be found when:

Where I/V represents the instantaneous

conductance of the PV array and dI/dV is the

instantaneous change in conductance.

The comparison of those two quantities tells

us on which side of the MPP we are currently

operating.

dV

dIVI

dV

dIV

dV

dVI

dV

VId

dV

dP

)(

dV

dI

V

I

dV

dIVI

dV

dP 00

STATEFLOW Chart

Page 25: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

29

Photovoltaic Solar Power Vehicle Systems

DC

Power

Sunlight

PV Panels Motor Drive Vehicle Dynamics

DC

Power

Battery Storage

Charge Controller

Power Inverter

AC

Power

Page 26: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

30

Photovoltaic Solar Power Vehicle Systems

DC

Power

Sunlight

PV Panels Motor Drive Vehicle Dynamics

DC

Power

Battery Storage

Charge Controller

Power Inverter

AC

Power

Page 27: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

31

Mechanical Drivetrain: SimDriveline

Power Split Device

– Planetary gear, from

gear libraries in SimDriveline

Full Vehicle Model

– Tire models

Transient and steady-state dynamics

– Longitudinal dynamics

Relevant for fuel economy studies

Engine Model

– Lookup-table relating speed to available power

Extend models using Simscape language or Simulink

Page 28: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

34

MathWorks Support for American Solar

Challenge

Complimentary

Software for teams to

use for the competition

On-demand webinars

Free MATLAB and

Simulink Tutorials

Learn More: American Solar Challenge Resource Page on MathWorks Website

Page 29: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

35

Summary

Model individual electrical and electronic components

using fundamental equations, physical components

and/or experimental data

Switch between different levels of detail in your

component models to manage fidelity and speed as

needed

Design and tune control algorithms and test them

against requirements in time and frequency domain

Optimize the overall system performance in simulation

Page 30: Modeling and Simulation of Photovoltaic Solar Power ...americansolarchallenge.org/ASC/wp-content/uploads/2015/04/2015... · Modeling and Simulation of Photovoltaic Solar Power Vehicle

36

Q&A