Sorry but most of your assumptions about how this works are quite wrong.
Firstly, if I understand your motor, it is synchronous to the AC feeding it. You can control the speed to some degree by limiting the power to it so the load 'holds it back'
(increases the slip) but that implies the motor loses power and it's ability to maintain output under differing load conditions. See
https://en.wikipedia.org/wiki/Induction_motor for more information.
Second problem, you are attempting to limit the power using a triac which is either going to be fully conducting or not conducting at all. There may be a border condition where it randomly fires but that will not control your motor speed and could even damage it.
Third problem, you seem to be trying to control the current through your optocoupler LED using transistors working from an AC supply - that will never work for two reasons, the transistors and LED only work on DC and in any case you want the LED to be fully on or fully off, not set to different currents.
Fourth problem - I can't see how your logic works, even if you did want to make the worlds most complicated ADC and DAC, you appear to limit it to only one of eight possible output steps when it is possible to have 256.
CMOS logic and TTL work exactly the same, if you really did want the outputs of the comparators to work the other way around, just swap the inputs over!
Back to reality:
If your motor can be phase controlled, all you need is a zero crossing detector and a variable time delay before firing the triac. Like 'Control por fase' but NOT using an optocoupler as the variable resistor!
If it can't be phase controlled you might be able to drop complete cycles to limit the power available to it.
If both of those methods wont work, you need to consider a VFD circuit. That will allow you full power while still letting you adjust the speed but the circuitry is more complicated.
Brian.