- position error = your input - measured position (after voltage to angle conversion)
- P controller output = K * position error (NB : this command signal can be positive or negative , hence my first recommendation about knowing how to control your motor speed in amplitude and direction)
Al momento, stai seguendo questa domanda
- Vedrai gli aggiornamenti nel tuofeed del contenuto seguito.
- Potresti ricevere delle e-mail a seconda delle tuepreferenze per le comunicazioni.
DC Motor Position Control using Potentiometer as a Feedback
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/853215/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/853220/image.png)
33 Commenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/853700/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/853705/image.png)
- the speed control is defined by the abs block output (multiplied here by 255 to represent the PWM)
- the direction is given by the sign block that drives two switch blocks (these are the two IN1R1 and IN2R1 signals)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/853920/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/853925/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/853945/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/854180/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/854105/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/854175/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/854145/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/854215/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/854220/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/854935/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/854940/image.png)
- Can you suggest me a way to increase my PWM resolution?
- Also, is the P controller placed at the right position?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/855435/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/856125/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/857590/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/857595/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/857635/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/859315/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/859335/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/859350/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/859400/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/859450/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/859570/image.png)
- the PID output (which is now a closed loop command signal to the motor)
- the position sensor (as before)
Risposte (2)
5 Commenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/860675/image.jpeg)
Vedere anche
Categorie
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Si è verificato un errore
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia-Pacifico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)