Information on how the circuit works is available on this site. https://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/That schematic has so many errors that I cannot see what you are attempting to do.
l will only focus on the LM311, which has significant differences to the more common LM339.
For starters , it has an emitter output which is not shown, and requires to be connected to something otherwise you don’t have an output.
There are a pair of strobe/balance pins which can pick up noise if not terminated. And you cannot show how to terminate them if they are not drawn.
At the link, the LED current is 0.002A not 1A.Output current: 2mA
My goal is to understand the working logic of the circuit. It is to make calculations according to the values i want. Is this not possible?At the link, the LED current is 0.002A not 1A.
The circuit is full of problems.
Don't believe every thing you see on the internet. About 1/2 the circuits on the internet have serious errors. This one has many errors.
Going to a different forum will not change the answer.
The logic is wrong on many levels.understand the working logic of the circuit
The logic is wrong on many levels.
Normally a resistor is places below a LED to measure current. In this case there is a 1 ohm resistor. So 1A going through the LED will cause 1 volt across the resistor. 2mA = 2mV In a working circuit a amplifier compares this voltage to a reference voltage. Example one input of the amp is at a 200mV reference while the other input looks at 200mV across resistor "1R". If the LED current was low, that would cause the voltage on "1R" to be low, example 150mV. The amplifier will see 200-150=50mV of error which get amplified and will force a working PWM to increase the duty cycle.