Description
Description-Separate-1This example explains how to create a CSV file and use LabVIEW to read that file. The example imagines a user who wants to simulate a permanent magnet synchronous motor (PMSM) with the PMSM variable parameter model custom device by reading a CSV file.
Description-Separate-2How to Use
How-Separate-1Refer to the Attachments section for a template CSV file. The CSV file contains information about motor characteristics. The first column of the template CSV file consists of keywords. Each keyword contains values that describe the motor parameters. For PMSM simulation with the Electric Motor Simulation toolkit, all the keywords in the template CSV file are required except coil base temperature [K], coil temperature coefficient, magnet base temperature [K], and magnet temperature coefficient.
The following are some tips for creating a CSV file.
- All values must be pure numbers.
- Current in inductance tables_d current [A], inductance tables_q current [A], flux table_d current [A] and flux table_q current [A] must be in ascending order.
- The number of values in inductance tables_d current [A] must be equal to the number of columns in inductance tables_d inductance [H] and inductance tables_q inductance [H].
- The number of values in inductance tables_q current [A] must be equal to the number of rows in inductance tables_d inductance [H] and inductance tables_q inductance [H].
- The number of values in flux table_d current [A] must be equal to the number of columns in flux table_flux [Wb].
- The number of values in flux table_q current [A] must be equal to the number of rows in flux table_flux [Wb].
Complete the following steps to simulate a PMSM by reading a CSV file.
- Download and unzip the attached Example.zip file.
- Open the PMSM Variable Parameter Model (CSV File) folder to access the PMSM Variable Parameter Model Closed Loop (CSV File).vi. Use this VI to perform the closed-loop simulation of a PMSM with the variable parameter model.
- Open the Create PMSM Variable Parameter Model (CSV File).llb to access the Create PMSM Variable Parameter Model (CSV File).vi. Use this VI to read a CSV file to get a LabVIEW class reference of PMSM variable parameter model. Use the CSV file in the _CSV File folder.
How-Separate-2