Microcontrollers instead of Control theory

Thread Starter

bootloader9800

Joined Jan 12, 2021
79
Hello friends. Hope u guys are doing well.
I began reading the first few chapters of Norman Nise's "Control Systems Engineering" text book.

My question to you guys is...

Can that entire control system theory be replaced using arduino based or other NXP based microcontrollers? I do know that there will be exceptions, but cant almost 99% of control solutions be satisfied by using run of the mill microcontrollers and PID based software?
I say this because when I see some examples in the textbook ( like a robot picking up bags), I feel that it might be easier to find a solution with a regular microcontroller with some PID based software thereby eliminating complex circuit elements like error correction/ summing amplifiers etc?
Thank you for your replies!
 

Papabravo

Joined Feb 24, 2006
21,323
Not by a long shot. You need to understand and appreciate the difference between a continuous time system and a discrete time, sampled data system. It is ONLY from that perspective that you can evaluate the suitability of one approach over the others. IMHO an Arduino lacks the serious horsepower of a dedicated DSP.

In particular it may be worth noting that time varying delay is a highly non-linear feature of any control system.
 

crutschow

Joined Mar 14, 2008
34,853
cant almost 99% of control solutions be satisfied by using run of the mill microcontrollers and PID based software?
Yes.
Most control systems are now digital computer based.

An alternate to using PID (which is a linear system analog approach that is digitally emulated in a micro) is Fuzzy Logic, which is a digital control approach that can handle non-linearity in the system (which many systems have), and can be easier to design and understand.

But as PB noted, the system complexity and required response speed will determine whether a standard micro is fast enough for the job.
 

nsaspook

Joined Aug 27, 2009
13,590
Nothing will eliminate the need to understand basic control systems theory at the level taught in that book if you want to design reliable devices that operate within real-world limitations. Digital computers are just the implementation tools for complex mathematical models of the corrective behavior needed for a usually very non-digital guy called analog device X. The error correction/ summing amplifiers have digital equivalents in the software routines that implement a PID feedback loop with much greater precision and accuracy that most analog equivalents.

The digital solution moves some of the the complexity, it doesn't eliminate it.
 

MrChips

Joined Oct 2, 2009
31,106
You are confused in attempting to lump Arduino and control systems theory into the same box.
An Arduino is like a small motor in a toy car. You would never use something like that to fly an aircraft on autopilot.

Let's put it differently.
The language used to describe control systems theory is mathematics.
An Arduino system or any MCU-based system might be able to perform the required mathematics. The question is, can the selected digital platform perform the required computation with the required amount of data, precision and accuracy in the required amount of time?
 

LowQCab

Joined Nov 6, 2012
4,312
There is also the advantage of having a dedicated Circuit that only has one
fixed, well calibrated function.
You supply Power to it and it performs the same function repeatedly, and instantly,
there's no waiting for an Interrupt, or Clock, or
possibility of a programming bug causing a conflict or crash.
It could be compared to a precision-mechanical-device,
possibly controlling a larger machine.

The first successful Automotive Electronic-Fuel-Injection-Systems back in
the late '60's were 100% Analog, and they worked quite well.
It took another ~40-years of development before "purpose-built"
Digital-Computers became fast enough to completely replace all
Analog-Functions in Engine and Transmission Control.
And, they're still not significantly "better-performing" than the Analog methods,
but they do offer much easier adjustability by way of Software-Programming,
so one computer-design can be used for many different, but similar, applications.

The World outside of a Digital-Computer is all Analog.
.
.
.
 

djsfantasi

Joined Apr 11, 2010
9,188
There is also the advantage of having a dedicated Circuit that only has one
fixed, well calibrated function.
You supply Power to it and it performs the same function repeatedly, and instantly,
there's no waiting for an Interrupt, or Clock, or
possibility of a programming bug causing a conflict or crash.
It could be compared to a precision-mechanical-device,
possibly controlling a larger machine.

The first successful Automotive Electronic-Fuel-Injection-Systems back in
the late '60's were 100% Analog, and they worked quite well.
It took another ~40-years of development before "purpose-built"
Digital-Computers became fast enough to completely replace all
Analog-Functions in Engine and Transmission Control.
And, they're still not significantly "better-performing" than the Analog methods,
but they do offer much easier adjustability by way of Software-Programming,
so one computer-design can be used for many different, but similar, applications.

The World outside of a Digital-Computer is all Analog.
.
.
.
IMHO, you are expressing opinions based on obsolete technology. You’ve already told us you are not a programmer, don’t understand software and prefer hardware/analog solutions.

In fact, you state
You supply Power to it and it performs the same function repeatedly, and instantly,
. This is the definition of a software solution. Software is much more repeatable than hardware, dealing with binary conditions which are either True/False. Analog deals with a continuum of conditions, highly susceptible to outside conditions.

Why would anyone expect you to recommend a software solution? Why would anyone believe you when you say a software solution wouldn’t work?

Only a noobie!

I can do anything in software that you can do in hardware. ANYTHING! With the advantage of tuning it’s performance without changing the circuit. I will admit there are some prerequisites that must be met.

Sensors with appropriate sensitivity are required. An MCU with sufficient power is required. A minor point is that the MCU has sufficient memory, with one caveat. Someone with a hardware background will overestimate the resources required.

I have 50+ years in designing software solutions. I created artificial intelligence software in the late 60s/early 70s. I’ve created proprietary languages with two dozen commands and controlling 1-2 dozen motors and optional peripherals, in 384K. Including a run time system, pre-compiler, and external control.

I’ll admit there may be places for analog control. But from my perspective, only in limited situations. And only after a software designer has had a crack at the problem.

Sorry gentleman. Non-digital designs are becoming (or have become obsolete). There has been research that digital solutions can describe how plants grow, how evolution occurs, and the activity of the universe.
 

LowQCab

Joined Nov 6, 2012
4,312
Each technology has it's place.
I have absolutely no problem with Computers,
but I see many people starting out in Electronics,
start with having an idea of the huge potential of today's small Computers
but with no clue about how to best interface it with the outside World.
With the huge number of sets of Rules and Languages, and new stuff coming out daily,
it's not surprising that may of them are struggling just to keep up.

I'm simply not passionate enough about learning multiple complete new Languages
to put in the full-time effort it takes to be reasonably competent at Programming,
I have too many other pursuits that I find to be more important at this time,
and I don't have the Photographic-Memory that's virtually required for Programming.

The gap between the different Worlds is well illustrated by reading a Data-Sheet from
the average cheap Micro-Controller, it's ~300 pages long, and no where does it give
specifications for the Electrical properties of the Inputs or Outputs, or give suggestions
for the preferred method of interfacing with the outside World.

It's almost necessary to have specialists for each area now.

I like to use the analogy of a small Band of Musicians ........
The Lead Guitar-Player, or Lead-Singer, gets all the fame and glory,
but he's nowhere, and can't even play, without the Drummer and Bass-Player,
and nobody ever heard of the guy who actually wrote the Music and Lyrics,
or the guy that tweaked every nuance of their performance and recorded it.
But without all of them coming together, there's no Music.
And not one of them is "more important" than the others,
and any one of them can also completely ruin the song.

Some of the best Music ever created, was created without Computers,
but Computers can most definitely enhance certain aspects of that creation,
but will never completely replace it.
.
.
.
 

Deleted member 115935

Joined Dec 31, 1969
0
Regarding the original question, microcontroller instead of control theory ,

The question is flawed.

Control theory is independent of how the implication is done,

to reinforce this ,
Our students do a project , balancing a ball on top of a hoop that moves,
using just an op amp solution and then using a micro controller solution.

both are valid,
both have pros and cons,

And in reality , now day I'd say most control will be done in a micro controller, but the fundamentals still have to be understood.
 

BobTPH

Joined Jun 5, 2013
9,299
An Arduino is like a small motor in a toy car. You would never use something like that to fly an aircraft on autopilot.
I suspect an Arduino could easily do what analog circuits did in an autopilot system from 50 years ago. We are talking about response times on the order of seconds here, not microseconds.

Edit to add: I am talking about an autopilot that merely kept the plane flying straight and level in a specified direction. Not something that could autonomously fly a plane from takeoff to landing.

Bob
 

LowQCab

Joined Nov 6, 2012
4,312
Tiny Micro-Controllers can now handle Quad-Copters on completely
autonomous, multiple-Way-Point adventures, including Return-To-Home, and Landing.
Pretty amazing.
A real Pilot is still required for landing Planes though.
.
.
.
 

Deleted member 115935

Joined Dec 31, 1969
0
Tiny Micro-Controllers can now handle Quad-Copters on completely
autonomous, multiple-Way-Point adventures, including Return-To-Home, and Landing.
Pretty amazing.
A real Pilot is still required for landing Planes though.
.
.
.

Just out of interest,
Planes can / do land themselves,
https://www.flightdeckfriend.com/ask-a-pilot/can-a-plane-land-automatically
there are auto systems, depending on the airport, that will even get the plane to the stand.

Currently the only thing planes are not allowed to do automatically , is the initial wheels up take off.
The pilot in charge has to "pull up" / press the commit button to leave the runway,
the famous V1 / V2 calls.


After wheels are de weighted the autopilot can be engaged,
in fact for take offs from airports that have noise abatement ( all I know anyway, which is unfortunately quiet a few ) , its "mandatory" to engage auto pilot as soon as wheels are de weighted.
 

Papabravo

Joined Feb 24, 2006
21,323
I will quite readily admit that a good digital system is better than a bad analog system, and vice versa. The only way to know for sure is to compare the two is side by side, so you either have to build both systems or go with your gut and risk failure if you select the wrong one or implement your preferred choice poorly.
 

Irving

Joined Jan 30, 2016
4,077
The gap between the different Worlds is well illustrated by reading a Data-Sheet from
the average cheap Micro-Controller, it's ~300 pages long, and no where does it give
specifications for the Electrical properties of the Inputs or Outputs, or give suggestions
for the preferred method of interfacing with the outside World.
That's because the electrical characteristics are often in a separate 'family' hardware & interfacing guide - STM and others have so many device variations of speed, memory sizes, peripherals, etc, that the common, basic stuff has been extracted into a standard hardware document for the whole product line.
 

crutschow

Joined Mar 14, 2008
34,853
And digital emulation of the old analog PID approach is not the only way to configure a control loop with a digital processor.
PID was developed as an analog way to do linear control loops because analog was the only thing available.
Digital processing allows system loop control (which can be non-linear) without using PID.
 

djsfantasi

Joined Apr 11, 2010
9,188
In modern control systems you design digital but think analog in processes and products because the world is mixed signal. Today 32-bit 'designed for motor control' controllers have analog frontends with op-amps and other analog features.
View attachment 246457
http://ww1.microchip.com/downloads/cn/DeviceDoc/cn597782.pdf
This partly illustrates my response to people who argue that digital solutions DON’T teach base analog theories.

MCU solutions are a gateway to analog electronics. Immediately, a new electronics hobbyist is presented with solving an analog problem. How to interface an MCU to LEDs using a transistor. As the freshman goes further into digital solutions, they have to learn more and more basic electronics.

A digital solution is like a flowchart. The logic background can easily be implemented (for many people) and the rest of he solution becomes an exercise for the student.
 

LowQCab

Joined Nov 6, 2012
4,312
That's because the electrical characteristics are often in a separate 'family' hardware & interfacing guide - STM and others have so many device variations of speed, memory sizes, peripherals, etc, that the common, basic stuff has been extracted into a standard hardware document for the whole product line.
.
Very interesting, I'll have to look into that .......

They still list all the standard Package-Dimensions, Solder-Masks, Disclaimers, etc.,
I wonder why they decided that 2 or 3 more pages was just too much
for "Family-Interface-Specifications" or something similar.

"Easily drives up to 2-TTL Inputs" worries me sometimes.
Maybe they are simply referring to
"at-the-Specified-Slew-Rate" or
"with XX Capacitive-Load"
or something similar,
that they never seem to find important enough to include.
And the rest of the text quite often seems to be an interpretation of Japanese,
pretty good most of the time, but really strange on occasion.
.
.
.
 
Top