Pictures and info to come
This project requires the PWM output of an arduino to be filtered so that it is an analog signal to be outputted to a 4-20mA Analog PLC input.
Made a mathematical model of the circuit in the Laplace domain. From there, I used these equation to make a block diagram in MATLAB/Simulink to solve the equations. From there I made the physical circuit and hooked it up to a KEYSIGHT DSO1052B 50MHz, 1GSa/s Oscilloscope to compare.
Period: .002 Seconds Voltage range: 0V-5V Duty Cycle: 50% or 127.5 as the output value in the code