Comunicación serial arduino - simulink #4 control PID de velocidad de motor DC

Comunicación serial arduino - simulink #4 control PID de velocidad de motor DC

Control PID and Motor Speed Adjustment

Introduction to Serial Communication and Motor Control

  • The session begins with a focus on reading and writing to the serial port, transitioning into a practical application involving motor control using a slider.
  • Discussion of controlling motor speed through Arduino communication, emphasizing the importance of adjusting parameters for effective operation.

Troubleshooting and Code Adjustments

  • Identification of an issue related to reading data; the speaker suggests implementing a delay in the Arduino code to resolve this problem.
  • A specific delay of 100 milliseconds is proposed as part of the solution, indicating adjustments made at the end of the code.
  • The program is recompiled with updated timing settings, ensuring synchronization between commands sent to the motor.

Motor Speed Testing

  • The speaker tests motor speed variations from maximum down to zero, demonstrating real-time feedback on performance.
  • Observations are made regarding communication indicators (TX/RX), highlighting their significance in monitoring system status during operation.

Experimental Identification Process

  • Introduction of an experimental identification process where additional outputs for time and speed are suggested for better data collection.
  • Explanation of generating vectors for true data acquisition aimed at obtaining transfer functions based on voltage inputs and sampling times.

Implementation of PID Control

  • Transitioning towards implementing PID control strategies while maintaining focus on system performance metrics observed during testing.
  • Emphasis on unit step responses within identification processes, showcasing how these can be integrated into programming blocks for further analysis.

Data Visualization and Analysis

  • Setting up parameters for maximum output values in experiments; discussions include configuring workspace elements necessary for effective data visualization.

Understanding Sampling Periods and Motor Control

Adjusting Sampling Periods

  • The discussion begins with the importance of sampling periods, noting that a one-millisecond sampling period is necessary for accurate measurements.
  • Configuration adjustments are made to the system, changing parameters to optimize performance; specifically, setting a sampling period of 0.001 seconds.

Analyzing Motor Performance

  • The analysis focuses on how a motor reaches its maximum speed within one second, emphasizing the need for improvements in this process.
  • A specific reading adjustment is suggested to enhance performance; reducing values can lead to better results.

Data Collection and Processing

  • Information gathered over ten seconds allows for identification and analysis of motor behavior during operation.
  • Data vectors such as time and velocity are discussed; these will be processed using Excel for further analysis.

Control System Implementation

  • The conversation shifts towards control systems, highlighting the use of reference functions and state estimation processes.
  • Emphasis is placed on comparing actual output against desired outcomes to refine control mechanisms.

Finalizing Control Parameters

  • A new control system setup is proposed, focusing on adjusting reference points for optimal performance.
  • The controller's role in managing real-time data from the motor is outlined, ensuring effective feedback loops are established.

Control System Tuning and Saturation Issues

Initial Observations on RPM Control

  • The speaker aims to reach 1300 RPM but observes that the system is struggling to achieve nominal control, indicating potential issues with the current setup.
  • A signal value (wm) is noted to be limited between 0 and 255, which suggests a configuration issue affecting performance.

Understanding Saturation in Control Systems

  • The concept of saturation is introduced, where input values are scaled from a minimum of 0 to a maximum of 255, defining the operational limits of the controller.
  • The speaker emphasizes that this saturation adjustment is crucial for proper functioning and control response.

Testing Adjusted Parameters

  • After implementing saturation limits, further tests reveal that the system still struggles to maintain desired speeds; it peaks at around 1200 RPM instead of reaching higher targets.
  • Attempts to set a lower target speed (1000 RPM) do not yield improvements as the system continues to max out at approximately 1200 RPM.

Analyzing Controller Performance

  • The actual speed readings fluctuate significantly, indicating discrepancies between set points and real-time performance metrics.
  • Discussion shifts towards utilizing a Proportional Integral Derivative (PID) controller for better tuning and achieving desired outcomes.

Fine-Tuning PID Controller Settings

  • Initial PID settings are tested with proportional adjustments aimed at improving control responsiveness; however, results remain inconsistent.
  • Observations show that while some progress has been made in controlling motor behavior, achieving exact target speeds remains elusive.

Further Adjustments and Results

  • Continuous adjustments lead to minor improvements in control but still fall short of reaching the targeted speed of 1000 RPM consistently.
  • The speaker notes ongoing challenges with tuning parameters effectively within acceptable ranges for optimal performance.

Final Remarks on System Behavior

  • As testing progresses, fluctuations in output signals indicate persistent issues needing resolution before reliable operation can be achieved.

Understanding Value Scaling in Software

Introduction to Value Scaling

  • The discussion begins with the concept of scaling values in software, specifically referencing a system that uses cataloging. The maximum value is noted as 255, while an example input exceeds this at 1,3290.
  • It is explained that true RPM (Revolutions Per Minute) values can be scaled down to fit within the maximum limit of 255 for processing.

Practical Application of Scaling

  • A method is described where inputs are adjusted from their original high values to a range between 0 and 255, allowing for easier management and analysis.
  • An example is provided where a target value of 220 is set, demonstrating how adjustments are made to reach this desired output effectively.

Challenges in Data Conversion

  • The conversation highlights issues related to data type conversion when handling these scaled values. There’s mention of needing to convert certain variables into appropriate formats for processing.
  • A specific error involving variable types is discussed, indicating the importance of correct data handling in achieving accurate results.

Monitoring Output Values

  • As the process continues, it’s noted that while the output reaches the expected maximum (255), fluctuations occur over time which can be visualized on a graph.
  • The need for continuous monitoring and adjustment based on real-time data feedback is emphasized.

Adjustments and Testing Parameters

  • Further adjustments are made based on observed outputs; there’s a focus on ensuring that parameters align closely with reference points for optimal performance.
  • Discussions about applying group settings indicate collaborative efforts in refining control mechanisms within the software environment.

Final Testing Scenarios

  • A series of tests are conducted with different set points (e.g., testing with values around 240), aiming to validate system responses under varying conditions.
Video description

se realiza el lazo cerrado de control de velocidad, se escala la velocidad de entrad de 0 a 255 y la señal de control pwm tambien se satura de 0 a 255, y se va probando el control PID, ademas de explican los pasos necesarios para la identificacion experimental de la funcion de transferencia del motor DC