ImportGenPWM (class)

Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Import/ImportGenPWM

class ImportGenPWM(fs=96000, duration=10, f=50, fmax=0, fmode=0, fswimode=0, fswi=1000, fswi_max=3000, typePWM=8, Vdc1=2, U0=1, type_carrier=0, is_transpose=False, init_dict=None, init_str=None)[source]

Bases: pyleecan.Classes.ImportMatrix.ImportMatrix

To generate a PWM voltage matrix

VERSION = 1
get_data()

Generate the PWM matrix

Parameters

self (ImportGenPWM) – An ImportGenPWM object

Returns

matrix – The generated PWM matrix

Return type

ndarray

save(save_path='', is_folder=False)

Save the object to the save_path

Parameters
  • self – A pyleecan object

  • save_path (str) – path to the folder to save the object

  • is_folder (bool) – to split the object in different files: separate simulation machine and materials

copy(**kwargs)

Return a copy of the class

get_logger()

Get the object logger or its parent’s one

Parameters

obj – A pyleecan object

Returns

logger – Pyleecan object dedicated logger

Return type

logging.Logger

compare(other, name='self')[source]

Compare two objects and return list of differences

as_dict(**kwargs)[source]

Convert this object in a json serializable dict (can be use in __init__). Optional keyword input parameter is for internal use only and may prevent json serializability.

property fs

sample frequency

Type

float

Min

0

property duration

int :min: 0

Type

Type

property f

fundamental frequency

Type

float

Min

0

property fmax

maximal fundamental frequency

Type

float

Min

0

property fmode

Fixed speed, 1: Variable speed

Type

int

Min

0

Type

speed mode

Type

0

property fswimode

Fixed fswi, 1:Variable fswi

Type

int

Type

switch mode

Type

0

property fswi

switching frequency

Type

float

property fswi_max

maximal switching frequency

Type

int

property typePWM

DPWMMIN 2: DPWMMAX 3: DPWM0 4: DPWM1 5: DPWM2 6: DPWM3 7: SVPWM 8: SPWM

Type

int

Type

0

Type

GDPWM 1

property Vdc1

DC BUS voltage

Type

float

property U0

reference voltage

Type

float

property type_carrier

backwards toothsaw carrier 3: toothsaw carrier else: symetrical toothsaw carrier

Type

int

Type

1

Type

forward toothsaw carrier 2