Digital PID Controller

I am trying to create a digital PID controller with a low pass filter using a function generator (to alter the frequency) and oscilloscope (to read the voltage input/output). I will also be using a PWM output signal from the Arduino connected to the the low pass filter to convert to an analog voltage.

Another requirement is to generate an interrupt service routine (ISR) function with a timer at a specific rate. According to my project details, I am supposed to have 3 functions: setup, loop, and ISR.

I have done my research and have noticed many other do this type of controller with thermal components and a potentiometer. I noticed there is a function called PID() that can be used by including the appropriate library. Would that function be applicable in this scenario? Also, I have having a hard time with the ISR function. How do I incorporate that into my code?

Any ideas/suggestions are appreciated. An image has been attached to visualize the circuit.

FinalProjectCircuit.JPG

OP image posted:

a better visialisation would be your intended control loop for the system you described as a block diagram...

also a PID implies some form of feedback, the circuit you posted shows none.

Look into the TimerOne library.

For this assignment, the PID library is unsuitable. It has its own internal timing.