Motor ControlThis demo shows one workflow using Simulink® to develop a การแปล - Motor ControlThis demo shows one workflow using Simulink® to develop a ไทย วิธีการพูด

Motor ControlThis demo shows one wo







Motor Control


This demo shows one workflow using Simulink® to develop a motor control application for Texas Instruments™ C2000™ DSPs. The steps illustrated in this demo, depicted as incremental model refinements, suggest an example workflow for designing and implementing a motor control application on an embedded platform. This demo highlights advanced processor-specific capabilities of code generation software.

Optional hardware:
Digital Motor Controller board: Spectrum Digital® DM550Three-phase permanent magnet motor(PMSM): Applied Motion® A0100-103-3-000Vector® CAN card and CAN cableSerial cableCAN/serial transceiver modules for F2812 eZdsp


Supported configuration:
IDE/Tool chain: Texas Instruments™ Code Composer Studio™Boards: Spectrum Digital F2812 eZdsp™, F2808 eZdsp™, or F28335 eZdsp™


Recommended tutorials:
Automation Interface TutorialProject Generator TutorialGetting Started with Application Development

Contents

IntroductionTask 1 - Simulate Field Oriented Control (FOC) AlgorithmTask 2 - Profile the Algorithm Execution TimeTask 3 - Verify the Algorithm ImplementationConfigure PIL to Use Serial Communication Interface (SCI)Task 4 - Optimize Generated CodeTask 5 - Simulate Plant-Controller InteractionTask 6 - Integrate Device DriversTask 7 - Integrate the Algorithm with the Asynchronous SchedulerTask 8 - Monitor Target Signals Using SCI or CANTask 9 - Monitor Target Signals Using External ModeTask 10 - Generate Standalone CodeSummary

Introduction


This demo suggests a development workflow for a motor control application. It is suggested that you complete the workflow demos provided by the IDE Link component before continuing with this demo.

NOTE: Before continuing, verify that you have configured F2812 eZdsp, F2808 eZdsp or F28335 eZdsp board in the Code Composer Studio™ (CCS) Setup. If not, please go to CCS Setup and select one of these boards.
Task 1 - Simulate Field Oriented Control (FOC) Algorithm


In this task you will use the blocks from the C28x™ Digital Motor Control (DMC) library and the C28x™ IQMath library to create a Field Oriented Control algorithm suited for three-phase PMSM.

The inputs to the algorithm are simulated using Simulink source blocks. To represent the input signals in this algorithm, we use fixed-point variables with normalized format. For example, DMC blocks expect a position signal changing from 0 to 1 as the electrical angle of the system varies from 0 to 2*pi. Therefore, the position signal is a normalized conversion of the electrical angle that we are going to express using the Q17 fixed-point format. The Ia and Ib inputs in the Field Oriented Control model shown below represent the phase currents for phase A and B of the system. They are also represented in normalized fixed-point format, where 1 corresponds to the maximum current allowed per phase.

The algorithm outputs are voltages that should be applied to the PMSM, and are also expressed in normalized fixed-point format. These outputs usually feed the PWM blocks on the C2000 DSP. Therefore, we will scale them to fit a range from 0% to 100% of PWM duty cycle.

1. Open the Field Oriented Motor Control template.

2. Open the C28x Digital Motor Control Library and drag the "Clarke transformation", "Park transformation", "Inverse Park Transformation", and "Space Vector Generator" blocks to your template model.

3. Connect the signal lines to the corresponding input and output ports of the blocks introduced in the model. If you prefer, use a pre-configured FOC model to execute this task.

4. Start the simulation by pressing the play button of the Simulink model and observe the simulation results. Note that D-axis current becomes zero when the current Ia crosses the zero axis on its way down, when the position signal equals 0. This is the reference position. The current Ib is lagging the current Ia by 120 electrical degrees or by 1/3 of the normalized electrical angle. The voltage outputs are of the same amplitude as the current input in the normalized format.

5. You can now observe the effects of changing the simulation inputs on the controlled PMSM system. Increase the amplitudes of Ia and Ib to 1. Observe that this creates a Q-axis current of 1 and that the voltage outputs have the same amplitude. To create non-zero D-axis current, click the Ia block and change "Phase Offset" to 12500, then click the Ib block and change the "Phase Offset" to 12500-20000/3. The generated sine waves have 20000 samples per period. Advancing the phase of Ia and Ib by 2500 samples corresponds to 2*pi/8, or 1/8 of the per unit angle, which leads to a D-axis current with -amplitude*sqrt(2)/2 and a Q-axis current with amplitude*sqrt(2)/2.
Task 2 - Profile the Algorithm Execution Time


In this task, we will profile the real-time execution of the motor control algorithm created in Task 1. This will help us estimate the time needed to execute the control loop. Based upon the profiling results we will determine if the proposed design is feasible for the given application.

1. Open the Field Oriented Control Profiler Template Model.

2. Add a Target Preferences block to the model. Set its parameters to one of the supported configurations specified at the top of this demo. For more information on adding and configuring Target Preferences blocks, see this section in the IDE Link documentation.

3. Open the Simulink Model Explorer by selecting View -> Model Explorer (or by entering Ctrl+H). In Model Explorer, go to Configuration -> Solver and set the "Fixed step Size" to 10 microseconds.

4. While in Model Explorer, open the Simulation Configuration -> Code Generation. Under the "IDE Link" tab, enable "Profile real-time execution".

5. Generate code by selecting Tools -> by clicking Incremental Build button on the toolbar of your model (Ctrl+B). Once code has been generated, let it run for a few seconds and then halt the execution on the C2000 processor from the CCS IDE. At the MATLAB® prompt enter: profile(CCS_Obj, 'execution', 'report').

6. Inspect the profiling report to see the execution time for the Field Oriented Control algorithm.

7. You can automate the profiling operation with a MATLAB script. This script can be run on the current active model.
Task 3 - Verify the Algorithm Implementation


After you have simulated the algorithm and have confirmed the correctness of the simulation results, you will want to verify the generated code. The processor-in-the loop (PIL) co-simulation feature can be invoked to automatically compare results of the generated code running on the embedded processor against the corresponding simulation results.

1. Open the Field Oriented Control PIL Template Model.

2. Add a Target Preferences block to the Algorithm Subsystem. Set its parameters to one of the supported configurations specified at the top of this demo. For more information on adding and configuring Target Preferences blocks, see this section in the IDE Link documentation.

If you use F28335 eZdsp board and CCS is set up as simulator, do following before going to step 3:
Double click the Target Preferences block;Click on ".adc_cal" from "Compiler sections" on "Section" tab;Choose "ZONE7P" from "Placement";Click "OK" to close the Target Preferences block.


3. Open the Simulink Model Explorer by selecting View -> Model Explorer (or by entering Ctrl+H). In Model Explorer, go to Configuration -> Code Generation. Under the "IDE Link" tab, change the "Build Action" to "Create_Processor_In_the_Loop_project".

4. Generate code for the "Algorithm Subsystem" by right-clicking the "Algorithm Subsystem" and selecting "Code Generation -> Build Subsystem->Build". Once code has been generated in CCS, you should see a new "untitled" Simulink model with an automatically generated PIL block. Drag this block to your original model. Connect the signal lines to the corresponding input and output ports in the model.

5. Start the simulation by clicking the play button on the Simulink model. Simulink will execute the generated code on the embedded processor and the algorithm simulation in synchronous fashion. Observe that the results are identical, verifying the generated code against the original simulation design.
Configure PIL to Use Serial Communication Interface (SCI)


This step uses the IDE debugger for communication between the top Simulink model and the compiled component executing on target hardware.

Depending on your execution platform, you may be able to use serial communication interface for PIL simulation. PIL simulation using serial communication interface is generally much faster than the PIL simulation using IDE debugger.

For steps to enable serial communication interface for PIL simulation, see Enabling Serial Communication PIL Simulation.
Task 4 - Optimize Generated Code


After you have confirmed the correctness of the generated code on the embedded processor you will optimize the generated code.

1. Optimize Code by Using Optimized Library Blocks

Open Field Oriented Control with inputs and profile the execution of this model using the steps in Task #2. Note that the execution is slower by a factor of 10 compared to the execution result obtained in Task #2. The only difference between the two models is that we added sine wave inputs. This is because the Simulink Sine Wave block generates ANSI® C code that is not optimized for the selected processor.

To generate more efficient code, replace the Sine Wave blocks with the optimized IQMath sine function blocks from the C28x IQmath Library. Open the Inputs Comparison Model and run the model in simulation to confirm that these source blocks are emitting signals comparable to the Sine Wave blocks.

Open Field Oriented Control with optimized inputs. Follow the steps described in Task #2 to profile the execution of this model. Note that the execution time is not much closer to the results obtained in Task #2.

2. Optimize Code by Using Compiler-Specific Intrinsics

Using compile
0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
ควบคุมมอเตอร์การสาธิตนี้แสดงลำดับหนึ่งใช้ Simulink ®เพื่อพัฒนาโปรแกรมควบคุมมอเตอร์สำหรับเครื่องมือเท็กซัส C2000 ™™ DSPs ขั้นตอนที่แสดงในการสาธิตนี้ แสดงเป็นแบบจำลองแบบเพิ่มหน่วย refinements แนะนำเวิร์กโฟลว์สำหรับการออกแบบ และใช้โปรแกรมควบคุมมอเตอร์บนแพลตฟอร์มฝังตัวอย่าง การสาธิตนี้เน้นความสามารถเฉพาะตัวประมวลผลขั้นสูงของซอฟแวร์การสร้างรหัสฮาร์ดแวร์ไม่จำเป็น:บอร์ดควบคุมมอเตอร์ดิจิตอล: ดิจิตอลสเปคตรัม® DM550Three เฟสถาวร motor(PMSM): A0100-103-3-000Vector เคลื่อนไหวใช้®®สามารถการ์ดและสามารถ cableSerial ตัวรับส่งสัญญาณ cableCAN/ชุด โมดูล F2812 eZdspตั้งค่าคอนฟิกได้รับการสนับสนุน:สาย IDE/เครื่อง มือ: เครื่องมือเท็กซัส™รหัส Composer Studio ™บอร์ด: สเปกตรัมดิจิตอล F2812 eZdsp ™ F2808 eZdsp ™ หรือ F28335 eZdsp ™สอนแนะนำ:อัตโนมัติอินเตอร์เฟซ TutorialProject เครื่องกำเนิดไฟฟ้า TutorialGetting เริ่มต้น ด้วยการพัฒนาโปรแกรมประยุกต์เนื้อหาIntroductionTask 1 - จำลองฟิลด์เชิงควบคุม (FOC) AlgorithmTask 2 - โพรไฟล์ TimeTask การดำเนินการของอัลกอริทึม 3 - PIL ImplementationConfigure อัลกอริทึมเพื่อใช้งานอินเทอร์เฟซ (วิทยาศาสตร์วิศวกรรม) สื่อสารแบบอนุกรม 4 - ปรับ 5 - สร้าง CodeTask ตรวจสอบจำลอง InteractionTask ควบคุมพืช 6 - รวมอุปกรณ์ DriversTask 7 - รวมอัลกอริทึมกับ SchedulerTask แบบอะซิงโครนัส 8 - ตรวจสอบเป้าหมายสัญญาณใช้วิทยาศาสตร์วิศวกรรม หรือ CANTask -ตรวจสอบเป้าหมายสัญญาณใช้ภายนอก ModeTask 10 - 9 สร้าง CodeSummary แบบสแตนด์อโลนแนะนำการสาธิตนี้แนะนำพัฒนาลำดับงานสำหรับการใช้ควบคุมมอเตอร์ ขอแนะนำว่า คุณทำตัวอย่างลำดับที่โดยส่วนประกอบเชื่อมโยง IDE ก่อนการสาธิตนี้หมายเหตุ: ก่อนดำเนินการต่อ ตรวจสอบว่า คุณได้กำหนดค่า F2812 eZdsp, F2808 eZdsp หรือ F28335 eZdsp บอร์ดในการตั้งค่ารหัส Composer Studio ™ (CCS) ถ้าไม่ กรุณาไปที่ตั้งค่า CCS แล้วเลือกบอร์ดเหล่านี้อย่างใดอย่างหนึ่งงาน 1 - จำลองฟิลด์ควบคุมแนว (FOC) อัลกอริทึมในงานนี้ คุณจะใช้บล็อกจากรี C28x ™ดิจิตอลมอเตอร์ควบคุม (DMC) และรี C28x ™ IQMath เพื่อสร้างอัลกอริทึมควบคุมแนวฟิลด์สำหรับ 3 เฟส PMSMอินพุตกับอัลกอริทึมจะจำลองการใช้บล็อก Simulink แหล่ง แสดงสัญญาณในอัลกอริทึมนี้ เราใช้เรื่องตัวแปร มีรูปแบบมาตรฐาน ตัวอย่าง บล็อกเรียงคาดว่าสัญญาณตำแหน่งเปลี่ยนจาก 0 เป็น 1 เป็นมุมไฟฟ้าของระบบตั้งแต่ใน 0 ถึง 2 * pi ดังนั้น สัญญาณตำแหน่งเป็นแปลงมุมไฟฟ้าที่เรากำลังจะแสดงโดยใช้รูปแบบควา Q17 มาตรฐาน อินพุต Ia และ Ib ในแบบจำลองการควบคุมเน้นฟิลด์ที่แสดงอยู่ด้านล่างแสดงถึงกระแสระยะสำหรับระยะ A และ B ของระบบ พวกเขายังแสดงในรูปเงินตรามาตรฐาน ที่ 1 ตรงกับกระแสสูงสุดที่อนุญาตสำหรับแต่ละขั้นตอนแสดงผลอัลกอริทึมมีแรงดันที่ควรใช้กับการ PMSM และยังได้แสดง ในรูปมาตรฐานเงินตรา แสดงผลเหล่านี้มักจะกินบล็อก PWM C2000 DSP ดังนั้น เราจะปรับขนาดให้พอดีกับช่วงจาก 0% ถึง 100% ของวงจร PWM ภาษี1. เปิดแบบเน้นควบคุมมอเตอร์ฟิลด์2. เปิด C28x ดิจิตอลมอเตอร์ควบคุมไลบรารี และลาก "คลาร์กแปลง" "สวนแปลง" "ผกผันสวนแปลง" และ "ตัวสร้างเวกเตอร์พื้นที่" บล็อกรุ่นคุณแม่3. เชื่อมต่อเส้นสัญญาณเพื่อป้อนข้อมูลที่เกี่ยวข้องและพอร์ตแสดงผลของบล็อกในรูปแบบ ถ้าคุณต้องการ ใช้แบบ FOC กำหนดไว้ล่วงหน้าเพื่อดำเนินการงานนี้4. เริ่มต้นการจำลอง โดยการกดปุ่มเล่นรุ่น Simulink และสังเกตผลการทดลอง โปรดสังเกตว่า แกน D ปัจจุบันกลายเป็น ศูนย์เมื่อ Ia ปัจจุบันตัดแกนศูนย์มาลง เมื่อสัญญาณตำแหน่งเท่ากับ 0 นี่คือตำแหน่งอ้างอิง Ib ปัจจุบันเป็น lagging Ia ปัจจุบัน 120 องศาไฟฟ้า หรือ 1/3 ของมุมไฟฟ้ามาตรฐาน แสดงผลแรงดันเป็นคลื่นเดียวกันเป็นการป้อนข้อมูลปัจจุบันในรูปแบบมาตรฐาน5. คุณสามารถสังเกตเห็นผลกระทบของการเปลี่ยนอินพุตการจำลองระบบควบคุม PMSM ขณะนี้ เพิ่มช่วงของ Ia และ Ib เป็น 1 สังเกตว่า นี้สร้างแกน Q ที่กระแส 1 และที่แรงดันไฟฟ้าแสดงผลมีความกว้างเดียวกัน สร้างคลิกปัจจุบัน D-แกนคล้อง Ia บล็อกการเปลี่ยนแปลง "ระยะออฟเซ็ต" 12500 แล้วคลิกบล็อก Ib และเปลี่ยน "ระยะออฟเซ็ต" 12500-20000/3 สร้างคลื่นไซน์ได้ 20000 ตัวอย่างสำหรับแต่ละรอบระยะเวลา เลื่อนระยะ Ia และ Ib โดยตัวอย่าง 2500 ตรงกับ 2 * pi/8 หรือ 1/8 ของการต่อหน่วยมุม ซึ่งนำไปสู่ปัจจุบัน D-แกนมี - คลื่น * sqrt จะ (2) / 2 และปัจจุบันแกน Q กับคลื่น * sqrt จะ (2) / 2งาน 2 - โพรไฟล์เวลาดำเนินการขั้นตอนวิธีในงานนี้ เราจะโพรไฟล์การทำงานแบบเรียลไทม์ของอัลกอริทึมควบคุมมอเตอร์ในงาน 1 นี้จะช่วยให้เราประเมินเวลาที่ต้องดำเนินการควบคุมลูป ตามผลการสร้างโพรไฟล์เราจะกำหนดว่าการออกแบบที่นำเสนอเป็นไปได้สำหรับโปรแกรมประยุกต์ที่กำหนด1. เปิดฟิลด์ควบคุมตัวสร้างโพรไฟล์แบบจำลองที่เน้น2. เพิ่มกลุ่มเป้าหมายลักษณะแบบ ตั้งค่าพารามิเตอร์การตั้งค่าคอนฟิกได้รับการสนับสนุนที่ระบุด้านบนของการสาธิตนี้ สำหรับข้อมูลเพิ่มเติมเกี่ยวกับการเพิ่ม และกำหนดค่าเป้าหมายลักษณะบล็อก ดูหัวข้อนี้ในเอกสารเชื่อมโยง IDE3. เปิด Explorer รุ่น Simulink โดยเลือกมุมมอง -> รุ่น Explorer (หรือ โดยการป้อน Ctrl + H) ในรุ่น Explorer ไปกำหนดค่า -> Solver และตั้ง "ถาวรขั้นตอนขนาด" 10 microseconds4. ในขณะที่ในรุ่น Explorer เปิดการกำหนดค่าการจำลอง -> รหัสรุ่น ภายใต้แท็บ "IDE ลิงค์" ใช้ "ส่วนกำหนดค่าการประมวลผลแบบเรียลไทม์"5. รหัสสร้าง โดยเลือกเครื่องมือ -> โดยการคลิกสร้างเพิ่มปุ่มบนแถบเครื่องมือแบบจำลอง (Ctrl + B) เมื่อมีการสร้างรหัส ปล่อยให้มันทำงานสำหรับสองสามวินาที และจากนั้น หยุดการทำงานบนโพรเซสเซอร์ C2000 จาก CCS IDE พร้อมท์ที่ MATLAB ®ป้อน: โพรไฟล์ (CCS_Obj 'ปฏิบัติการ' 'รายงาน')6. ตรวจสอบรายงานสร้างโพรไฟล์เพื่อดูเวลาการดำเนินการสำหรับอัลกอริทึมตัวควบคุมแนวเขต7. คุณสามารถทำการสร้างโพรไฟล์กับสคริปต์ MATLAB สคริปต์นี้สามารถรันบนแบบจำลองที่ใช้งานอยู่ปัจจุบันงาน 3 - ตรวจสอบการใช้งานอัลกอริทึมหลังจากที่คุณได้จำลองขั้นตอนวิธีการ และได้ยืนยันความถูกต้องของผลการจำลอง คุณจะต้องตรวจสอบรหัสที่สร้างขึ้น คุณลักษณะการจำลองร่วมประมวลผลในเดอะลูป (PIL) ที่สามารถถูกเรียกโดยอัตโนมัติเปรียบเทียบผลลัพธ์ของรหัสสร้างขึ้นทำงานบนตัวประมวลผลที่ฝังตัวกับผลการทดลองสอดคล้องกัน1. เปิดฟิลด์ควบคุม PIL แบบจำลองที่เน้น2. เพิ่มกลุ่มเป้าหมายลักษณะระบบย่อยอัลกอริทึม ตั้งค่าพารามิเตอร์การตั้งค่าคอนฟิกได้รับการสนับสนุนที่ระบุด้านบนของการสาธิตนี้ สำหรับข้อมูลเพิ่มเติมเกี่ยวกับการเพิ่ม และกำหนดค่าเป้าหมายลักษณะบล็อก ดูหัวข้อนี้ในเอกสารเชื่อมโยง IDEIf you use F28335 eZdsp board and CCS is set up as simulator, do following before going to step 3:Double click the Target Preferences block;Click on ".adc_cal" from "Compiler sections" on "Section" tab;Choose "ZONE7P" from "Placement";Click "OK" to close the Target Preferences block.3. Open the Simulink Model Explorer by selecting View -> Model Explorer (or by entering Ctrl+H). In Model Explorer, go to Configuration -> Code Generation. Under the "IDE Link" tab, change the "Build Action" to "Create_Processor_In_the_Loop_project".4. Generate code for the "Algorithm Subsystem" by right-clicking the "Algorithm Subsystem" and selecting "Code Generation -> Build Subsystem->Build". Once code has been generated in CCS, you should see a new "untitled" Simulink model with an automatically generated PIL block. Drag this block to your original model. Connect the signal lines to the corresponding input and output ports in the model.5. Start the simulation by clicking the play button on the Simulink model. Simulink will execute the generated code on the embedded processor and the algorithm simulation in synchronous fashion. Observe that the results are identical, verifying the generated code against the original simulation design.Configure PIL to Use Serial Communication Interface (SCI)This step uses the IDE debugger for communication between the top Simulink model and the compiled component executing on target hardware.Depending on your execution platform, you may be able to use serial communication interface for PIL simulation. PIL simulation using serial communication interface is generally much faster than the PIL simulation using IDE debugger.For steps to enable serial communication interface for PIL simulation, see Enabling Serial Communication PIL Simulation.Task 4 - Optimize Generated CodeAfter you have confirmed the correctness of the generated code on the embedded processor you will optimize the generated code.1. Optimize Code by Using Optimized Library BlocksOpen Field Oriented Control with inputs and profile the execution of this model using the steps in Task #2. Note that the execution is slower by a factor of 10 compared to the execution result obtained in Task #2. The only difference between the two models is that we added sine wave inputs. This is because the Simulink Sine Wave block generates ANSI® C code that is not optimized for the selected processor.To generate more efficient code, replace the Sine Wave blocks with the optimized IQMath sine function blocks from the C28x IQmath Library. Open the Inputs Comparison Model and run the model in simulation to confirm that these source blocks are emitting signals comparable to the Sine Wave blocks.Open Field Oriented Control with optimized inputs. Follow the steps described in Task #2 to profile the execution of this model. Note that the execution time is not much closer to the results obtained in Task #2.2. Optimize Code by Using Compiler-Specific IntrinsicsUsing compile
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!






การควบคุมมอเตอร์การสาธิตครั้งนี้แสดงให้เห็นถึงขั้นตอนการทำงานอย่างใดอย่างหนึ่งโดยใช้Simulink®การพัฒนาโปรแกรมสำหรับการควบคุมมอเตอร์ Texas Instruments ™ C2000 ™ DSPs ขั้นตอนที่แสดงให้เห็นในการสาธิตนี้วาดเป็นรูปแบบการปรับแต่งที่เพิ่มขึ้นแนะนำขั้นตอนการทำงานเช่นการออกแบบและการใช้แอพลิเคชันการควบคุมมอเตอร์บนแพลตฟอร์มฝังตัว การสาธิตครั้งนี้ไฮไลท์ความสามารถในการประมวลผลเฉพาะขั้นสูงของซอฟแวร์การสร้างรหัส. ฮาร์ดแวร์ตัวเลือก: ดิจิตอลมอเตอร์คณะกรรมการควบคุม: สเปกตรัมDigital® DM550Three เฟสมอเตอร์แม่เหล็กถาวร (PMSM): ประยุกต์Motion®A0100-103-3-000Vector®บัตรและ CAN CAN cableSerial cableCAN / โมดูลรับส่งสัญญาณแบบอนุกรมสำหรับ F2812 eZdsp การกำหนดค่าที่รองรับ: IDE / ห่วงโซ่เครื่องมือ: Texas Instruments ™รหัสนักแต่งเพลงที่สตูดิโอ™บอร์ด: สเปกตรัมดิจิตอล F2812 eZdsp ™, F2808 eZdsp ™หรือ F28335 eZdsp ™บทเรียนที่แนะนำ: อัตโนมัติอินเตอร์เฟซ TutorialProject Generator TutorialGetting ต้นกับแอพลิเคชัน การพัฒนาเนื้อหาIntroductionTask 1 - จำลองสนามควบคุมเชิง (ฟรี) AlgorithmTask 2 - รายละเอียดการดำเนินการขั้นตอนวิธี TimeTask 3 - ตรวจสอบขั้นตอนวิธี ImplementationConfigure PIL การใช้การสื่อสารแบบอนุกรม Interface (SCI) งาน 4 - เพิ่มประสิทธิภาพสร้าง CodeTask 5 - จำลองพืชควบคุม InteractionTask ที่ 6 - บูรณาการอุปกรณ์ DriversTask 7 - บูรณาการอัลกอริทึมที่มี Asynchronous SchedulerTask ที่ 8 - การตรวจสอบการใช้สัญญาณเป้าหมาย SCI หรือ CANTask 9 - การตรวจสอบการใช้สัญญาณเป้าหมายภายนอก ModeTask 10 - สร้างแบบสแตนด์อโลน CodeSummary บทนำสาธิตนี้แสดงให้เห็นขั้นตอนการทำงานการพัฒนาแอพลิเคชันสำหรับการควบคุมมอเตอร์ มันบอกว่าคุณเสร็จสิ้นการสาธิตขั้นตอนการทำงานที่ได้รับจากองค์ประกอบเชื่อมโยง IDE ก่อนที่จะดำเนินการต่อด้วยการสาธิตนี้. หมายเหตุ: ก่อนที่จะดำเนินการต่อไปให้ตรวจสอบว่าคุณได้กำหนดค่า F2812 eZdsp, F2808 eZdsp หรือคณะกรรมการ F28335 eZdsp ในนักแต่งเพลงรหัสสตูดิโอ™ (CCS) การติดตั้ง . ถ้าไม่ได้โปรดไปที่การติดตั้งซีซีเอสและเลือกหนึ่งในบอร์ดเหล่านี้. งาน 1 - จำลองสนามควบคุมเชิง (ฟรี) อัลกอริทึมในงานนี้คุณจะใช้บล็อกจากC28x ™ดิจิตอลควบคุมมอเตอร์ (DMC) ห้องสมุดและ C28x ™ IQMath ห้องสมุดที่จะสร้างอัลกอริทึมการควบคุมเชิงฟิลด์เหมาะสำหรับการ PMSM สามเฟส. ปัจจัยการผลิตที่จะอัลกอริทึมมีการจำลองโดยใช้แหล่งกำเนิดบล็อก Simulink เพื่อเป็นตัวแทนของสัญญาณในขั้นตอนวิธีนี้เราจะใช้ตัวแปรคงที่จุดที่มีรูปแบบปกติ ตัวอย่างเช่นบล็อก DMC คาดว่าสัญญาณการเปลี่ยนแปลงตำแหน่งที่ 0-1 เป็นมุมไฟฟ้าของระบบที่แตกต่างกันไป 0-2 * ปี่ ดังนั้นสัญญาณตำแหน่งเป็นแปลงปกติของมุมไฟฟ้าที่เราจะแสดงการใช้ Q17 รูปแบบจุดคงที่ ไอโอวาและปัจจัยการผลิต Ib ในสนามรูปแบบการควบคุมเชิงแสดงด้านล่างเป็นตัวแทนของกระแสเฟสเฟส A และ B ของระบบ พวกเขายังเป็นตัวแทนในรูปแบบจุดคงปกติที่ 1 สอดคล้องกับปัจจุบันสูงสุดที่อนุญาตต่อเฟส. ขับอัลกอริทึมที่มีแรงดันไฟฟ้าที่ควรจะนำไปใช้กับ PMSM และจะแสดงในรูปแบบยังคงจุดปกติ ผลเหล่านี้มักจะกินบล็อก PWM ใน DSP C2000 ดังนั้นเราจึงจะขนาดให้เหมาะสมกับช่วงจาก 0% ถึง 100% ของรอบหน้าที่ PWM. 1 เปิดสนาม Oriented แม่แบบของการควบคุมมอเตอร์. 2 เปิดการควบคุมมอเตอร์ดิจิตอล C28x ห้องสมุดและลาก "การเปลี่ยนแปลงคล๊าร์ค", "การเปลี่ยนแปลงพาร์ค", "การเปลี่ยนแปลงผกผันพาร์ค" และ "เครื่องกำเนิดไฟฟ้าแบบเวกเตอร์อวกาศ" บล็อกรูปแบบแม่แบบของคุณ. 3 เชื่อมต่อสายสัญญาณเพื่อการป้อนข้อมูลที่สอดคล้องกันและพอร์ตการส่งออกของบล็อกที่นำมาใช้ในรูปแบบ ถ้าคุณต้องการใช้รูปแบบฟรีที่กำหนดไว้ล่วงหน้าในการดำเนินงานนี้. 4 เริ่มต้นการจำลองโดยการกดปุ่มเล่นของรูปแบบ Simulink และสังเกตผลการจำลอง โปรดทราบว่าปัจจุบัน D-แกนกลายเป็นศูนย์เมื่อปัจจุบัน Ia ข้ามศูนย์แกนในทางของมันลงเมื่อสัญญาณตำแหน่งเท่ากับ 0 นี่เป็นตำแหน่งอ้างอิง อิบปัจจุบันล้าหลังไอโอวาในปัจจุบันโดย 120 องศาไฟฟ้าหรือ 1/3 ของมุมไฟฟ้าปกติ ขับแรงดันไฟฟ้าที่มีความกว้างเช่นเดียวกับการป้อนข้อมูลปัจจุบันในรูปแบบปกติ. 5 ตอนนี้คุณสามารถสังเกตเห็นผลกระทบของการเปลี่ยนแปลงปัจจัยการผลิตการจำลองในระบบ PMSM ควบคุม เพิ่มช่วงกว้างของคลื่นของ Ia และ Ib เพื่อ 1 สังเกตว่านี้สร้างกระแส Q แกน 1 และเอาท์พุทแรงดันไฟฟ้าที่มีความกว้างเดียวกัน ในการสร้างที่ไม่ใช่ศูนย์ D-แกนปัจจุบันคลิกบล็อกเอียและการเปลี่ยนแปลง "เฟส Offset" เพื่อ 12500 จากนั้นคลิกที่บล็อก Ib และเปลี่ยน "เฟส Offset" เพื่อ 12500-20000 / 3 ที่สร้างคลื่นไซน์มี 20,000 ตัวอย่างต่อระยะเวลา Advancing ขั้นตอนของการ Ia และ Ib 2500 โดยกลุ่มตัวอย่างที่สอดคล้องกับ 2 * ปี่ / 8 หรือ 1/8 ของมุมต่อหน่วยซึ่งนำไปสู่ปัจจุบัน D-แกนกับ -amplitude * sqrt (2) / 2 และ Q- แกนในปัจจุบันมีความกว้าง * sqrt (2) / 2. งาน 2 - ข้อมูลส่วนตัวเวลาการดำเนินการขั้นตอนวิธีในงานนี้เราจะโปรไฟล์การดำเนินการในเวลาจริงของขั้นตอนวิธีการควบคุมมอเตอร์ที่สร้างขึ้นในงาน1 นี้จะช่วยให้เราประเมินเวลาที่จำเป็น ในการดำเนินการควบคุมวง ขึ้นอยู่กับผลการโปรไฟล์ที่เราจะตรวจสอบว่าการออกแบบที่นำเสนอเป็นไปได้สำหรับการใช้งานที่กำหนด. 1 เปิดสนาม Oriented ควบคุม Profiler แม่แบบรุ่น. 2 เพิ่มบล็อกเป้าหมายที่จะตั้งค่ารูปแบบ ตั้งค่าพารามิเตอร์ในการอย่างใดอย่างหนึ่งของการกำหนดค่าการสนับสนุนที่ระบุไว้ที่ด้านบนของการสาธิตนี้ สำหรับข้อมูลเพิ่มเติมเกี่ยวกับการเพิ่มและการกำหนดค่าการตั้งค่าเป้าหมายบล็อกดูในส่วนของการเชื่อมโยงในเอกสารนี้ IDE. 3 เปิด Simulink รุ่น Explorer โดยการเลือกดู -> รุ่น Explorer (หรือโดยการป้อน Ctrl + H) ในรุ่น Explorer ไปที่การกำหนดค่า -> Solver และการตั้งค่า "ขั้นตอนขนาดคงที่" 10 microseconds. 4 ในขณะที่ในรุ่น Explorer เปิดการกำหนดค่าการจำลอง -> การสร้างรหัส ภายใต้ "IDE เชื่อมโยงแท็บ" เปิดใช้งาน "ข้อมูลส่วนตัวการดำเนินการในเวลาจริง". 5 รหัสสร้างโดยการเลือกเครื่องมือ -> โดยคลิกที่ปุ่มสร้างที่เพิ่มขึ้นบนแถบเครื่องมือของรูปแบบของคุณ (Ctrl + B) เมื่อรหัสได้รับการสร้างให้มันทำงานไม่กี่วินาทีแล้วหยุดการดำเนินการเกี่ยวกับการประมวลผล C2000 จาก IDE CCS ที่พรอมต์MATLAB®ป้อน: รายละเอียด (CCS_Obj 'การกระทำ', 'รายงาน'). 6 ตรวจสอบรายงานโปรไฟล์เพื่อดูเวลาดำเนินการสำหรับขั้นตอนวิธีการควบคุมเชิงฟิลด์. 7 คุณสามารถทำให้การดำเนินงานโปรไฟล์ที่มีสคริปต์ MATLAB สคริปต์นี้สามารถทำงานในรูปแบบที่ใช้งานในปัจจุบัน. งาน 3 - ตรวจสอบการดำเนินการขั้นตอนวิธีหลังจากที่คุณได้จำลองขั้นตอนวิธีการและได้รับการยืนยันความถูกต้องของผลการจำลองที่คุณจะต้องการที่จะตรวจสอบรหัสที่สร้างขึ้น หน่วยประมวลผลในวง (PIL) คุณลักษณะร่วมจำลองสามารถเรียกโดยอัตโนมัติเปรียบเทียบผลของการสร้างรหัสที่ทำงานบนหน่วยประมวลผลแบบฝังตัวกับผลการจำลองที่สอดคล้องกัน. 1 เปิดสนามการควบคุมเชิง PIL แม่แบบรุ่น. 2 เพิ่มบล็อกเป้าหมายการตั้งค่าไปยังระบบย่อยขั้นตอนวิธี ตั้งค่าพารามิเตอร์ในการอย่างใดอย่างหนึ่งของการกำหนดค่าการสนับสนุนที่ระบุไว้ที่ด้านบนของการสาธิตนี้ สำหรับข้อมูลเพิ่มเติมเกี่ยวกับการเพิ่มและการกำหนดค่าการตั้งค่าเป้าหมายบล็อกดูส่วนในเอกสารที่เชื่อมโยง IDE นี้. ถ้าคุณใช้คณะกรรมการ F28335 eZdsp และ CCS ถูกตั้งค่าเป็นจำลองการทำต่อไปนี้ก่อนที่จะไปขั้นตอนที่ 3: ดับเบิ้ลคลิกที่บล็อกการตั้งค่าเป้าหมาย; คลิก ที่ ".adc_cal" จาก "ส่วนคอมไพเลอร์" กับ "มาตราแท็บ"; เลือก "ZONE7P" จาก "ตำแหน่ง". คลิก "OK" เพื่อปิดกั้นการตั้งค่าเป้าหมาย3 เปิด Simulink รุ่น Explorer โดยการเลือกดู -> รุ่น Explorer (หรือโดยการป้อน Ctrl + H) ในรุ่น Explorer ไปที่การกำหนดค่า -> การสร้างรหัส ภายใต้ "IDE เชื่อมโยงแท็บ" เปลี่ยน "สร้างแอคชั่น" กับ "Create_Processor_In_the_Loop_project". 4 สร้างรหัสสำหรับ "อัลกอริทึมระบบย่อย" โดยการคลิกขวาที่ "อัลกอริทึมระบบย่อย" และเลือก "สร้างรหัส -> สร้าง Subsystem-> สร้าง" เมื่อได้รับรหัสสร้างขึ้นใน CCS คุณจะเห็นใหม่ "ชื่อ" รูปแบบ Simulink กับบล็อกที่สร้างขึ้นอัตโนมัติ PIL ลากบล็อกนี้กับรูปแบบเดิมของคุณ เชื่อมต่อสายสัญญาณเพื่อการป้อนข้อมูลที่สอดคล้องกันและพอร์ตออกในรูปแบบ. 5 เริ่มต้นการจำลองโดยการคลิกปุ่มเล่นในรูปแบบ Simulink Simulink จะดำเนินการรหัสที่สร้างขึ้นในการประมวลผลที่ฝังตัวและการจำลองขั้นตอนวิธีในแบบซิงโคร สังเกตว่าผลเหมือนการตรวจสอบรหัสที่สร้างขึ้นกับการออกแบบจำลองเดิม. กำหนดค่า PIL การใช้การสื่อสารแบบอนุกรม Interface (SCI) ขั้นตอนนี้จะใช้ดีบัก IDE สำหรับการสื่อสารระหว่างรูปแบบ Simulink ด้านบนและองค์ประกอบที่รวบรวมการดำเนินการบนฮาร์ดแวร์เป้าหมาย. ทั้งนี้ขึ้นอยู่กับ บนแพลตฟอร์มการดำเนินการของคุณคุณอาจจะสามารถที่จะใช้อินเตอร์เฟซการสื่อสารแบบอนุกรมสำหรับการจำลอง PIL จำลอง PIL ใช้อินเตอร์เฟซการสื่อสารแบบอนุกรมโดยทั่วไปเร็วกว่าการจำลอง PIL ใช้ดีบัก IDE. สำหรับขั้นตอนการเปิดใช้งานอินเตอร์เฟซการสื่อสารแบบอนุกรมสำหรับการจำลอง PIL ให้ดูที่การเปิดใช้งานการสื่อสารแบบอนุกรม PIL จำลอง. งาน 4 - เพิ่มประสิทธิภาพสร้างรหัสหลังจากที่คุณได้รับการยืนยันความถูกต้องของสร้างรหัสในการประมวลผลที่ฝังตัวอยู่ที่คุณจะเพิ่มประสิทธิภาพของรหัสที่สร้างขึ้น. 1 เพิ่มประสิทธิภาพของรหัสโดยใช้บล็อกห้องสมุด Optimized เปิดสนามกับการควบคุมเชิงปัจจัยการผลิตและรายละเอียดการดำเนินการของรุ่นนี้ใช้ขั้นตอนในงาน # 2 โปรดทราบว่าการดำเนินการจะช้าโดยปัจจัยที่ 10 เมื่อเทียบกับผลการดำเนินการที่ได้รับในงาน # 2 ข้อแตกต่างระหว่างทั้งสองรุ่นคือการที่เราเพิ่มปัจจัยการผลิตคลื่นไซน์ เพราะนี่คือบล็อก Simulink ไซน์เวฟANSI®สร้างรหัส C ที่ไม่เหมาะสำหรับการประมวลผลที่เลือก. เพื่อสร้างรหัสที่มีประสิทธิภาพมากขึ้นแทนที่บล็อกไซน์เวฟกับบล็อกที่ดีที่สุด IQMath ฟังก์ชั่นไซน์จาก C28x IQmath ห้องสมุด เปิดอินพุตเปรียบเทียบรุ่นและเรียกใช้แบบจำลองในการจำลองเพื่อยืนยันว่าแหล่งที่มาของบล็อกเหล่านี้จะส่งสัญญาณเทียบได้กับบล็อกไซน์เวฟ. เปิดสนามการควบคุมปัจจัยการผลิตที่มุ่งเน้นการเพิ่มประสิทธิภาพด้วย ทำตามขั้นตอนที่อธิบายไว้ในงาน # 2 รายละเอียดการดำเนินการของรุ่นนี้ โปรดทราบว่าเวลาดำเนินการไม่มากใกล้ชิดกับผลที่ได้รับในงาน # 2. 2 เพิ่มประสิทธิภาพของรหัสโดยใช้คอมไพเลอร์ Intrinsics เฉพาะการใช้คอมไพล์






































































































การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 3:[สำเนา]
คัดลอก!









นี้สาธิตควบคุมมอเตอร์ให้เวิร์กโฟลว์โดยใช้ Simulink ®พัฒนามอเตอร์ควบคุมการ Texas Instruments ™ c2000 ™ dsps . ขั้นตอนที่แสดงในการสาธิตนี้ อธิบายเป็นรูปแบบการปรับแต่งเพิ่ม แนะนำตัวอย่างเวิร์กโฟลว์สำหรับการออกแบบและการนำโปรแกรมควบคุมมอเตอร์ในการฝังตัวแพลตฟอร์มการสาธิตนี้เน้นเฉพาะความสามารถของหน่วยประมวลผลขั้นสูงซอฟต์แวร์รหัสรุ่น

ตัวเลือกฮาร์ดแวร์ :
คณะกรรมการควบคุมมอเตอร์ดิจิตอลดิจิตอลคลื่นความถี่® dm550three เฟสมอเตอร์แม่เหล็กถาวร ( pmsm ) : ใช้เคลื่อนไหว® a0100-103-3-000vector ®สามารถบัตรและสามารถ cableserial cablecan / อนุกรมโมดูล transceiver เพื่อ f2812 ezdsp


สนับสนุนการปรับแต่ง :
chain IDE / เครื่องมือ :Texas Instruments ™โค้ดเพลงสตูดิโอ™บอร์ด : สเปกตรัมดิจิตอล f2812 ezdsp ™ f2808 ezdsp , ™หรือ f28335 ezdsp ™


แนะนำสอน :
อัตโนมัติอินเตอร์เฟซ tutorialproject เครื่องกำเนิดไฟฟ้า tutorialgetting เริ่มต้นด้วย



เนื้อหาการพัฒนาโปรแกรมประยุกต์introductiontask 1 - จำลองสนามที่มุ่งเน้นการควบคุม ( ไม่คิดค่าบริการ ) algorithmtask 2 - รายละเอียดการดำเนินการขั้นตอนวิธี timetask 3 - ตรวจสอบขั้นตอนวิธี implementationconfigure พิลใช้อินเตอร์เฟซอนุกรมสื่อสาร ( SCI ) งาน 4 - เพิ่มประสิทธิภาพสร้าง codetask 5 - จำลอง interactiontask ควบคุมพืช 6 - รวมอุปกรณ์ driverstask 7 - รวมวิธีแบบอะซิงโครนัส schedulertask 8 -เป้าหมายสัญญาณใช้ sci หรือ cantask 9 - ตรวจสอบเป้าหมายสัญญาณที่ใช้ modetask ภายนอก 10 - สร้างแบบสแตนด์อโลน codesummary




อันนี้แนะนำสาธิตแสดงให้เห็นการพัฒนาเวิร์กโฟลว์สำหรับควบคุมโปรแกรม จะชี้ให้เห็นว่าคุณให้เวิร์กโฟลว์การสาธิตโดย IDE เชื่อมโยงองค์ประกอบก่อนต่อเนื่องกับการสาธิตนี้ หมายเหตุ

: เสียก่อน ตรวจสอบว่า คุณได้ตั้งค่า f2812 ezdsp f2808 ezdsp , หรือบอร์ด ezdsp f28335 ในโค้ดเพลงสตูดิโอ™ ( CCS ) การติดตั้ง ถ้าไม่กรุณาไปที่ CCS การติดตั้งและเลือกหนึ่งของบอร์ดเหล่านี้ .
งาน 1 - จำลองสนามที่มุ่งเน้นการควบคุม ( ฟรี ) โดย


ในงานนี้คุณจะใช้บล็อกจาก c28x ™ดิจิตอลควบคุมมอเตอร์ ( DMC ) ห้องสมุดและ c28x ™ iqmath ห้องสมุดเพื่อสร้างเขตข้อมูลที่มุ่งเน้นการควบคุมอัลกอริทึมเหมาะสำหรับสามเฟส pmsm .

กระผมกับขั้นตอนวิธี ) ใช้บล็อกเป็นแหล่ง Simulink .เพื่อแสดงสัญญาณในขั้นตอนนี้ เราใช้ตัวแปรเรื่องที่มีมาตรฐานรูปแบบ ตัวอย่างเช่น , DMC บล็อกคาดหวังตำแหน่งสัญญาณเปลี่ยนจาก 0 เป็น 1 เป็นมุมทางไฟฟ้าของระบบที่แตกต่างกันตั้งแต่ 0 ถึง 2 * pi ดังนั้น สัญญาณตำแหน่งเป็นปกติการเปลี่ยนแปลงของมุมทางไฟฟ้าที่เราจะแสดงการใช้ q17 เรื่องรูปแบบIA IB และปัจจัยการผลิตในด้านมุ่งเน้นการควบคุมแบบจำลองที่แสดงด้านล่างแสดงระยะกระแสสำหรับเฟส A และ B ของระบบ พวกเขายังได้แสดงในรูปที่ 1 รูปแบบเรื่อง สอดคล้องกับกระแสสูงสุดที่อนุญาตต่อเฟส

วิธีผลเป็นแรงดันไฟฟ้าที่ควรใช้กับ pmsm และยังแสดงออกในรูปแบบจุดตรึง .
การแปล กรุณารอสักครู่..
 
ภาษาอื่น ๆ
การสนับสนุนเครื่องมือแปลภาษา: กรีก, กันนาดา, กาลิเชียน, คลิงออน, คอร์สิกา, คาซัค, คาตาลัน, คินยารวันดา, คีร์กิซ, คุชราต, จอร์เจีย, จีน, จีนดั้งเดิม, ชวา, ชิเชวา, ซามัว, ซีบัวโน, ซุนดา, ซูลู, ญี่ปุ่น, ดัตช์, ตรวจหาภาษา, ตุรกี, ทมิฬ, ทาจิก, ทาทาร์, นอร์เวย์, บอสเนีย, บัลแกเรีย, บาสก์, ปัญจาป, ฝรั่งเศส, พาชตู, ฟริเชียน, ฟินแลนด์, ฟิลิปปินส์, ภาษาอินโดนีเซี, มองโกเลีย, มัลทีส, มาซีโดเนีย, มาราฐี, มาลากาซี, มาลายาลัม, มาเลย์, ม้ง, ยิดดิช, ยูเครน, รัสเซีย, ละติน, ลักเซมเบิร์ก, ลัตเวีย, ลาว, ลิทัวเนีย, สวาฮิลี, สวีเดน, สิงหล, สินธี, สเปน, สโลวัก, สโลวีเนีย, อังกฤษ, อัมฮาริก, อาร์เซอร์ไบจัน, อาร์เมเนีย, อาหรับ, อิกโบ, อิตาลี, อุยกูร์, อุสเบกิสถาน, อูรดู, ฮังการี, ฮัวซา, ฮาวาย, ฮินดี, ฮีบรู, เกลิกสกอต, เกาหลี, เขมร, เคิร์ด, เช็ก, เซอร์เบียน, เซโซโท, เดนมาร์ก, เตลูกู, เติร์กเมน, เนปาล, เบงกอล, เบลารุส, เปอร์เซีย, เมารี, เมียนมา (พม่า), เยอรมัน, เวลส์, เวียดนาม, เอสเปอแรนโต, เอสโทเนีย, เฮติครีโอล, แอฟริกา, แอลเบเนีย, โคซา, โครเอเชีย, โชนา, โซมาลี, โปรตุเกส, โปแลนด์, โยรูบา, โรมาเนีย, โอเดีย (โอริยา), ไทย, ไอซ์แลนด์, ไอร์แลนด์, การแปลภาษา.

Copyright ©2024 I Love Translation. All reserved.

E-mail: