Tuesday, July 26, 2016

Simulink Angle Encoder Feedback Motor Control

This is a continuation of the MATLAB and Simulink Incremental Rotary Angle Encoder post.

Controlling an Elevation Motor based off of Angle Error

This is where the fun starts. 

Wednesday, July 20, 2016

MATLAB and Simulink Incremental Rotary Angle Encoder

VIPER Angle Encoding System

Purpose: 

To accurately read an angle encoding device that can be fixed to the 2-m Radio Telescope. Using MATLAB Simulink, an arduino microcontroller and a Keyes KY-040 Rotary Encoder module to determine the elevation angle, in both the laboratory and field settings. Additionally, establish a procedure for operation of the model in both settings.

Background:

Accurately pointing the 2-m Radio Telescope is the most important function of VIPER's controlling system. To do so an Incremental Rotary Encoder is being implemented to read changes in the current angle of the telescope. To familiarize yourself with an Incremental Rotary Encoder click here and for Gray Coding click here; this device is currently being used on the VIPER Radio Telescope. The arduino code from the above link is not a precise code, as its purpose is to introduce the user to the encoder.

What This Blog Accomplishes:

A explanation of how this model works, including the MATLAB Function, and how to use it in both the laboratory and field setting.

Using MATLAB Simulink, a microcontroller, and an Incremental Rotary Encoder angle changes can be detected and recorded. To do so two inputs are required to detect these changes (the CLK and DT of the encoder). With these two inputs and the application of the proper Simulink functions a precise angle encoder can be modeled and implemented. 

Simulinks Blocks Used:

Simulink Display Block
There are seven (7) DISPLAY  blocks in the above subsystem. There job is to easily access information at each string of coding. Although you do not have to have these blocks in your final product, it may be useful to keep them in for future usage or users.